aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs
diff options
context:
space:
mode:
authorPhilipp Riederer <[email protected]>2021-12-20 19:50:46 +0100
committerGitHub <[email protected]>2021-12-20 10:50:46 -0800
commit8623bd962da29716bab6bc0f0a4ef219d3151dd8 (patch)
tree806273a59a6c86fa796da960507a038f8f575b37 /lib/libzfs
parent3fa5266d727a0e9506dfeed0118cbe7dd3c2a18d (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/libzfs')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 098c7777c..9143ea11e 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -2542,7 +2542,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)