]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: lock_rename() needs both directories to live on the same fs
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 15 Oct 2023 01:34:40 +0000 (21:34 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 10:21:07 +0000 (11:21 +0100)
commit9dd1c2431ea0ba6e2cb6da58c7b35b7ad37185c0
treec11a3f814be98ec641f41419f5eae1d376b193e5
parenta481db81e7ead1369acca8e13b6939778cb7d2c5
nfsd: lock_rename() needs both directories to live on the same fs

commit 1aee9158bc978f91701c5992e395efbc6da2de3c upstream.

... checking that after lock_rename() is too late.  Incidentally,
NFSv2 had no nfserr_xdev...

Fixes: aa387d6ce153 "nfsd: fix EXDEV checking in rename"
Cc: stable@vger.kernel.org # v3.9+
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/vfs.c