xattr: break delegations in {set,remove}xattr
authorFrank van der Linden <fllinden@amazon.com>
Tue, 23 Jun 2020 22:39:18 +0000 (22:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 13:33:39 +0000 (15:33 +0200)
commit11e64146dc698f6543706d2865fb01cfea7e7b42
tree76d9c6c71519aab4568f026e0239db25301342e5
parent6059000e145feb0c0399717f34a70b8d74fe030d
xattr: break delegations in {set,remove}xattr

commit 08b5d5014a27e717826999ad20e394a8811aae92 upstream.

set/removexattr on an exported filesystem should break NFS delegations.
This is true in general, but also for the upcoming support for
RFC 8726 (NFSv4 extended attribute support). Make sure that they do.

Additionally, they need to grow a _locked variant, since callers might
call this with i_rwsem held (like the NFS server code).

Cc: stable@vger.kernel.org # v4.9+
Cc: linux-fsdevel@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xattr.c
include/linux/xattr.h