Skip to content

Commit 3a7bb21

Browse files
jtlaytonbrauner
authored andcommitted
fs: don't call posix_acl_listxattr in generic_listxattr
Commit f2620f1 caused the kernel to start emitting POSIX ACL xattrs for NFSv4 inodes, which it doesn't support. The only other user of generic_listxattr is HFS (classic) and it doesn't support POSIX ACLs either. Fixes: f2620f1 xattr: simplify listxattr helpers Reported-by: Ondrej Valousek <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Message-Id: <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent f15afbd commit 3a7bb21

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

fs/xattr.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,16 @@ int xattr_list_one(char **buffer, ssize_t *remaining_size, const char *name)
985985
return 0;
986986
}
987987

988-
/*
988+
/**
989+
* generic_listxattr - run through a dentry's xattr list() operations
990+
* @dentry: dentry to list the xattrs
991+
* @buffer: result buffer
992+
* @buffer_size: size of @buffer
993+
*
989994
* Combine the results of the list() operation from every xattr_handler in the
990-
* list.
995+
* xattr_handler stack.
996+
*
997+
* Note that this will not include the entries for POSIX ACLs.
991998
*/
992999
ssize_t
9931000
generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
@@ -996,10 +1003,6 @@ generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
9961003
ssize_t remaining_size = buffer_size;
9971004
int err = 0;
9981005

999-
err = posix_acl_listxattr(d_inode(dentry), &buffer, &remaining_size);
1000-
if (err)
1001-
return err;
1002-
10031006
for_each_xattr_handler(handlers, handler) {
10041007
if (!handler->name || (handler->list && !handler->list(dentry)))
10051008
continue;

0 commit comments

Comments
 (0)