From: Yehuda Sadeh Weinraub Date: Wed, 17 Dec 2008 15:21:26 +0000 (-0500) Subject: Btrfs: fix return value from btrfs_listxattr when buffer size is too small X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b16281c30c841c6d999ff36c8d903f42a69315f2;p=openwrt%2Fstaging%2Fblogic.git Btrfs: fix return value from btrfs_listxattr when buffer size is too small The return value was being overwritten. Signed-off-by: Yehuda Sadeh --- 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);