From b16281c30c841c6d999ff36c8d903f42a69315f2 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Weinraub Date: Wed, 17 Dec 2008 10:21:26 -0500 Subject: [PATCH] Btrfs: fix return value from btrfs_listxattr when buffer size is too small The return value was being overwritten. Signed-off-by: Yehuda Sadeh --- fs/btrfs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2