]> git.proxmox.com Git - mirror_zfs.git/commit
Ensure we call fput when cloning fails due to different devices.
authorDaniel Berlin <dberlin@dberlin.org>
Tue, 10 Oct 2023 18:04:32 +0000 (14:04 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Oct 2023 02:19:09 +0000 (19:19 -0700)
commit810fc49a3eb16647c905d02bd4f945e1e4332251
tree43b23f1b313d05c52f890aebfc96d1b08c0b96be
parent75a7740574e119b40b7f4144d1d3928d3a5c9b98
Ensure we call fput when cloning fails due to different devices.

Right now, zpl_ioctl_ficlone and zpl_ioctl_ficlonerange do not call
put on the src fd if the source and destination are on two different
devices.  This leaves the source file held open in this case.

Reviewed-by: Kay Pedersen <mail@mkwg.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
Closes #15386
module/os/linux/zfs/zpl_file_range.c