From 1217fd1ff8fc312f2167589c0e8dff969cde7ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 4 Apr 2022 14:25:01 +0200 Subject: [PATCH] libzfs: sendrecv: always cancel progress thread in zfs_send_one() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is in line with all the other uses of the progress thread Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #11560 Closes #13284 --- lib/libzfs/libzfs_sendrecv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 9214e7b743..d07c45c620 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)