]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Remove old orig_fd variable from zfs send
authorJorgen Lundman <lundman@lundman.net>
Thu, 22 Jul 2021 02:22:27 +0000 (11:22 +0900)
committerGitHub <noreply@github.com>
Thu, 22 Jul 2021 02:22:27 +0000 (20:22 -0600)
Possibly required in the past, but is currently fills no purpose.
Ordinarily such tiny cleanup is not generally worth it, however
on the macOS port, in a future commit, we do unspeakable things to the
"fd" for send/recv, and it would be easier to only have to deal with
one "fd" instead of two.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #12404

lib/libzfs/libzfs_sendrecv.c

index 5c57028c40132eb792f70744eea0ad9d0777fe33..36a480d36a052202fd55ff31fc7bf4a525d48e41 100644 (file)
@@ -2391,7 +2391,6 @@ zfs_send_one(zfs_handle_t *zhp, const char *from, int fd, sendflags_t *flags,
        int err;
        libzfs_handle_t *hdl = zhp->zfs_hdl;
        char *name = zhp->zfs_name;
-       int orig_fd = fd;
        pthread_t ptid;
        progress_arg_t pa = { 0 };
 
@@ -2523,7 +2522,7 @@ zfs_send_one(zfs_handle_t *zhp, const char *from, int fd, sendflags_t *flags,
 
        if (flags->props || flags->holds || flags->backup) {
                /* Write the final end record. */
-               err = send_conclusion_record(orig_fd, NULL);
+               err = send_conclusion_record(fd, NULL);
                if (err != 0)
                        return (zfs_standard_error(hdl, err, errbuf));
        }