]> Gentwo Git Trees - linux/.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, 24 Feb 2025 01:07:13 +0000 (20:07 -0500)
commita3eb15a7e21d79dbfd28c4bf4eb0e09c69a4f65f
treef83b0f33a36d71bf52c1e9ee2e2d97026422d0f4
parenta4ae943dbbbdc72e7da83465da4437feb3a5c2a8
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