]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFSD: Return NFS4ERR_FILE_OPEN only when linking an open file
authorChuck Lever <chuck.lever@oracle.com>
Sun, 26 Jan 2025 21:50:20 +0000 (16:50 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 10 Mar 2025 13:10:57 +0000 (09:10 -0400)
commit6e45906a0b8098937667ddf8fa3b07d916165688
tree2188e5c037a9fb2e38eb051db5e084407584b33b
parent3b60984e79fcb040509f09464406ed1bc6fed6a0
NFSD: Return NFS4ERR_FILE_OPEN only when linking an open file

RFC 8881 Section 18.9.4 paragraphs 1 - 2 tell us that RENAME should
return NFS4ERR_FILE_OPEN only when the target object is a file that
is currently open. If the target is a directory, some other status
must be returned.

The VFS is unlikely to return -EBUSY, but NFSD has to ensure that
errno does not leak to clients as a status code that is not
permitted by spec.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/vfs.c