Skip to content

Commit

Permalink
libzfs: sendrecv: always cancel progress thread in zfs_send_one()
Browse files Browse the repository at this point in the history
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 openzfs#11560
Closes openzfs#13284
  • Loading branch information
nabijaczleweli authored and behlendorf committed Apr 11, 2022
1 parent 35ddd8e commit 1f4c79b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/libzfs/libzfs_sendrecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1f4c79b

Please sign in to comment.