HomeFreeBSD

Make the NFSv4.2 server fail Copy when from and to files are the same.

Description

Make the NFSv4.2 server fail Copy when from and to files are the same.

The Linux copy_file_range() now allows the in_fd and out_fd to refer to
the same file. The Linux client implements this case using read/write
instead of the Copy operation, which is correct, since RFC-7862 does not
allow Copy to be done with both file handles referring to the same file.
When I looked, the server did not check for this case, so this patch adds
code to fail the Copy when both in and out file handles refer to the same
file.

Details

Provenance
rmacklemAuthored on
Parents
rS353601: Fix including bsd.compat.mk outside Makefile.libcompat on mips64.
Branches
Unknown
Tags
Unknown