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:35:38 +0000 (15:35 +0200)
commit1511086bb905cdebc77a79c60d0bc94d1d5f50d1
tree926cf067a4403153aabc7fb107ca46468292fc07
parentdba57fe0885cbef9a6ec75a1b0ff5914e832887d
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