Skip to content

nfsd: lock_rename() needs both directories to live on the same fs

Jeffrey Layton requested to merge jtlayton/centos-stream-9:RHEL-14840 into main

JIRA: https://issues.redhat.com/browse/RHEL-14840

commit 1aee9158bc978f91701c5992e395efbc6da2de3c
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sat Oct 14 21:34:40 2023 -0400

    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>

Signed-off-by: Jeffrey Layton jlayton@redhat.com

Edited by Jeffrey Layton

Merge request reports