aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-04-04 14:25:01 +0200
committerBrian Behlendorf <[email protected]>2022-04-05 09:45:55 -0700
commit1217fd1ff8fc312f2167589c0e8dff969cde7ce1 (patch)
tree77cc3cdd87f593585d6c1c6a75d737441954c2cc
parent3c69b539fe5acef100a2baad2084db6ade51f51b (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
-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 9214e7b74..d07c45c62 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -2643,8 +2643,7 @@ zfs_send_one_cb_impl(zfs_handle_t *zhp, const char *from, int fd,
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)