Skip to content

Commit dae5f57

Browse files
Andreas GruenbacherAl Viro
Andreas Gruenbacher
authored and
Al Viro
committed
vfs: Fix the posix_acl_xattr_list return value
When a filesystem that contains POSIX ACLs is mounted without ACL support (-o noacl), the appropriate behavior is not to list any existing POSIX ACL xattrs. The return value for list xattr handlers in this case is 0, not an error code: several filesystems that use the POSIX ACL xattr handlers do not expect the list operation to fail. Symlinks cannot have ACLs, so posix_acl_xattr_list will never be called for symlinks in the first place. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent c361016 commit dae5f57

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/posix_acl.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,7 @@ posix_acl_xattr_list(struct dentry *dentry, char *list, size_t list_size,
833833
size_t size;
834834

835835
if (!IS_POSIXACL(d_backing_inode(dentry)))
836-
return -EOPNOTSUPP;
837-
if (d_is_symlink(dentry))
838-
return -EOPNOTSUPP;
836+
return 0;
839837

840838
if (type == ACL_TYPE_ACCESS)
841839
xname = POSIX_ACL_XATTR_ACCESS;

0 commit comments

Comments
 (0)