summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-04-04 14:25:01 +0200
committerBrian Behlendorf <[email protected]>2022-04-11 15:48:46 -0700
commit1f4c79b1ce0b27b747149b2820fa5f6f051b7d4b (patch)
tree20ce0f5de02af1ac2df2d8145bbedebf68c1e299 /lib
parent35ddd8ee2e5fdbaa5b0d94c063bbc1a79ab12cb1 (diff)
libzfs: sendrecv: always cancel progress thread in zfs_send_one()
This is in line with all the other uses of the progress thread Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11560 Closes #13284
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index b67c9b30c..60050e22a 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -2522,8 +2522,7 @@ zfs_send_one(zfs_handle_t *zhp, const char *from, int fd, sendflags_t *flags,
if (flags->progress) {
void *status = NULL;
- if (err != 0)
- (void) pthread_cancel(ptid);
+ (void) pthread_cancel(ptid);
(void) pthread_join(ptid, &status);
int error = (int)(uintptr_t)status;
if (error != 0 && status != PTHREAD_CANCELED)