summaryrefslogtreecommitdiff
path: root/fs/xattr.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-03-07 08:27:30 (GMT)
committerIngo Molnar <mingo@kernel.org>2016-03-07 08:27:30 (GMT)
commitec87e1cf7d8399d81d8965c6d852f8057a8dd687 (patch)
tree472a168fa4861090edf110c8a9712a5c15ea259f /fs/xattr.c
parent869ae76147ffdf21ad24f0e599303cd58a2bb39f (diff)
parentf6cede5b49e822ebc41a099fe41ab4989f64e2cb (diff)
downloadlinux-ec87e1cf7d8399d81d8965c6d852f8057a8dd687.tar.xz
Merge tag 'v4.5-rc7' into x86/asm, to pick up SMAP fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/xattr.c')
-rw-r--r--fs/xattr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xattr.c b/fs/xattr.c
index 07d0e47..4861322 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -940,7 +940,7 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
bool trusted = capable(CAP_SYS_ADMIN);
struct simple_xattr *xattr;
ssize_t remaining_size = size;
- int err;
+ int err = 0;
#ifdef CONFIG_FS_POSIX_ACL
if (inode->i_acl) {
@@ -965,11 +965,11 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs,
err = xattr_list_one(&buffer, &remaining_size, xattr->name);
if (err)
- return err;
+ break;
}
spin_unlock(&xattrs->lock);
- return size - remaining_size;
+ return err ? err : size - remaining_size;
}
/*