From b5a18ea27f7a440eeebcca5795cf69a2805b1a5c Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Fri, 22 Aug 2025 13:24:25 -0700 Subject: [PATCH] vfs_vnops.c: Change the error return from ENOSYS to EOPNOTSUPP When the COPY_FILE_RANGE_CLONE flag argument is provided to copy_file_range(2), it will return failure if block cloning is not supported by the underlying file system. This patch changes the errno returned for this failure from ENOSYS to EOPNOTSUPP. Suggested by: kib Fixes: 37b2cb5ecb0f ("vfs: Add support for file cloning to VOP_COPY_FILE_RANGE") --- sys/kern/vfs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 93f87ddae4d..a4f41192f68 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3444,7 +3444,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, dat = NULL; if ((flags & COPY_FILE_RANGE_CLONE) != 0) { - error = ENOSYS; + error = EOPNOTSUPP; goto out; }