git: b5a18ea27f7a - main - vfs_vnops.c: Change the error return from ENOSYS to EOPNOTSUPP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 22 Aug 2025 20:27:14 UTC
The branch main has been updated by rmacklem:
URL: https://cgit.FreeBSD.org/src/commit/?id=b5a18ea27f7a440eeebcca5795cf69a2805b1a5c
commit b5a18ea27f7a440eeebcca5795cf69a2805b1a5c
Author: Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2025-08-22 20:24:25 +0000
Commit: Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2025-08-22 20:24:25 +0000
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 93f87ddae4de..a4f41192f684 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;
}