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)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 17 Oct 2023 04:24:35 +0000 (00:24 -0400)
commit1aee9158bc978f91701c5992e395efbc6da2de3c
treec4534d16822a693a863bd9356e2a8225ba0f9fce
parent94f6f0550c625fab1f373bb86a6669b45e9748b3
nfsd: lock_rename() needs both directories to live on the same fs

... 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>
fs/nfsd/vfs.c