aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 04:21:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 04:21:23 -0700
commit73dec82d8d2b2c6c9c9a66a1c8daae3fcd71d602 (patch)
tree5fd6c166c609accdbdf706dd0bf5310d53d293e7 /fs
parentMerge tag 'fbdev-v4.19-rc7' of https://github.com/bzolnier/linux (diff)
parentsysfs: Do not return POSIX ACL xattrs via listxattr (diff)
downloadlinux-dev-73dec82d8d2b2c6c9c9a66a1c8daae3fcd71d602.tar.xz
linux-dev-73dec82d8d2b2c6c9c9a66a1c8daae3fcd71d602.zip
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Al writes: "xattrs regression fix from Andreas; sat in -next for quite a while." * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: sysfs: Do not return POSIX ACL xattrs via listxattr
Diffstat (limited to 'fs')
-rw-r--r--fs/xattr.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/xattr.c b/fs/xattr.c
index daa732550088..0d6a6a4af861 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -948,17 +948,19 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
int err = 0;
#ifdef CONFIG_FS_POSIX_ACL
- if (inode->i_acl) {
- err = xattr_list_one(&buffer, &remaining_size,
- XATTR_NAME_POSIX_ACL_ACCESS);
- if (err)
- return err;
- }
- if (inode->i_default_acl) {
- err = xattr_list_one(&buffer, &remaining_size,
- XATTR_NAME_POSIX_ACL_DEFAULT);
- if (err)
- return err;
+ if (IS_POSIXACL(inode)) {
+ if (inode->i_acl) {
+ err = xattr_list_one(&buffer, &remaining_size,
+ XATTR_NAME_POSIX_ACL_ACCESS);
+ if (err)
+ return err;
+ }
+ if (inode->i_default_acl) {
+ err = xattr_list_one(&buffer, &remaining_size,
+ XATTR_NAME_POSIX_ACL_DEFAULT);
+ if (err)
+ return err;
+ }
}
#endif