summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYehuda Sadeh Weinraub <yehudasa@gmail.com>2008-12-17 10:21:26 -0500
committerChris Mason <chris.mason@oracle.com>2008-12-17 10:21:26 -0500
commitb16281c30c841c6d999ff36c8d903f42a69315f2 (patch)
treedf7ae4e2c7d948bae276c7c489158a58368a0ec5 /fs
parentcad321ad529400c6ab24c501a67c3be720a0744c (diff)
downloadlinux-stable-b16281c30c841c6d999ff36c8d903f42a69315f2.tar.gz
linux-stable-b16281c30c841c6d999ff36c8d903f42a69315f2.tar.bz2
linux-stable-b16281c30c841c6d999ff36c8d903f42a69315f2.zip
Btrfs: fix return value from btrfs_listxattr when buffer size is too small
The return value was being overwritten. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index adb4b32a9d51..4146f0710e6a 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -226,7 +226,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
if (!buffer || (name_len + 1) > size_left) {
ret = -ERANGE;
- break;
+ goto err;
}
name_ptr = (unsigned long)(di + 1);