summaryrefslogtreecommitdiffstats
path: root/fs/xattr.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2015-12-02 14:44:41 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-13 19:45:47 -0500
commitc4803c497fbdb37e96af614813a7cfb434b6682a (patch)
tree13ea05af560579eb3728a6c046e2657a06a902b0 /fs/xattr.c
parent5d92b75c753ae27578ee764df3be650c67fa5877 (diff)
downloadlinux-c4803c497fbdb37e96af614813a7cfb434b6682a.tar.gz
linux-c4803c497fbdb37e96af614813a7cfb434b6682a.tar.bz2
linux-c4803c497fbdb37e96af614813a7cfb434b6682a.zip
nfs: Move call to security_inode_listsecurity into nfs_listxattr
Add a nfs_listxattr operation. Move the call to security_inode_listsecurity from list operation of the "security.*" xattr handler to nfs_listxattr. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Cc: Trond Myklebust <trond.myklebust@primarydata.com> Cc: Anna Schumaker <anna.schumaker@netapp.com> Cc: linux-nfs@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xattr.c')
-rw-r--r--fs/xattr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xattr.c b/fs/xattr.c
index c3af6c9670cb..2c7776403aba 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -723,6 +723,8 @@ generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
if (!buffer) {
for_each_xattr_handler(handlers, handler) {
+ if (!handler->list)
+ continue;
size += handler->list(handler, dentry, NULL, 0,
NULL, 0);
}
@@ -730,6 +732,8 @@ generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
char *buf = buffer;
for_each_xattr_handler(handlers, handler) {
+ if (!handler->list)
+ continue;
size = handler->list(handler, dentry, buf, buffer_size,
NULL, 0);
if (size > buffer_size)