summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFrank van der Linden <fllinden@amazon.com>2020-06-23 22:39:18 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-21 11:01:55 +0200
commit419d10aec453598e5ea51dc4282a64502b718294 (patch)
tree25a8150c5cf52bac7c7061fa0d3de589e7857276 /include
parenta710335bb95805a117104eaeed359142edb91df0 (diff)
downloadlinux-stable-419d10aec453598e5ea51dc4282a64502b718294.tar.gz
linux-stable-419d10aec453598e5ea51dc4282a64502b718294.tar.bz2
linux-stable-419d10aec453598e5ea51dc4282a64502b718294.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/xattr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index e77605a0c8da..1b1c9bfd24e9 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -51,8 +51,10 @@ ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t);
ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size);
int __vfs_setxattr(struct dentry *, struct inode *, const char *, const void *, size_t, int);
int __vfs_setxattr_noperm(struct dentry *, const char *, const void *, size_t, int);
+int __vfs_setxattr_locked(struct dentry *, const char *, const void *, size_t, int, struct inode **);
int vfs_setxattr(struct dentry *, const char *, const void *, size_t, int);
int __vfs_removexattr(struct dentry *, const char *);
+int __vfs_removexattr_locked(struct dentry *, const char *, struct inode **);
int vfs_removexattr(struct dentry *, const char *);
ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size);