diff options
author | Philipp Riederer <[email protected]> | 2021-12-20 19:50:46 +0100 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-02-03 15:28:01 -0800 |
commit | 1833de81033e0bac0f68d1d3dc5f35454efc019a (patch) | |
tree | 8582c3dbdadd9ae429fdeebe2510a57771bc99eb /lib | |
parent | a1a52a356ba7c41c7318a893e0aafd9faacca939 (diff) |
Fix error propagation from lzc_send_redacted
Any error from lzc_send_redacted is overwritten by the error of
send_conclusion_record; skip writing the conclusion record if there
was an earlier error.
Reviewed-by: Paul Dagnelie <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Philipp Riederer <[email protected]>
Closes #12766
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 86ff8c91a..3e2eb5d91 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -2532,7 +2532,7 @@ zfs_send_one(zfs_handle_t *zhp, const char *from, int fd, sendflags_t *flags, "progress thread exited nonzero"))); } - if (flags->props || flags->holds || flags->backup) { + if (err == 0 && (flags->props || flags->holds || flags->backup)) { /* Write the final end record. */ err = send_conclusion_record(fd, NULL); if (err != 0) |