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 lundman committed Sep 2, 2022
1 parent 64c57d9 commit 7301127
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 @@ -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)
Expand Down

0 comments on commit 7301127

Please sign in to comment.