diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2012-11-25 21:58:36 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-12-16 20:46:07 -0500 |
commit | db2254bce4f19f458aaa05f9d00b39f413f7488c (patch) | |
tree | 22f17742e227a0b1c33daa545cd3f4a76064357c /fs/btrfs/xattr.c | |
parent | 071401258a580dec2a3e0c2700b7e76f3ed43320 (diff) |
Btrfs: fix an while-loop of listxattr
If we found an invalid xattr dir item, we'd better try the next one instead.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/xattr.c')
-rw-r--r-- | fs/btrfs/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c index 3f4e2d69e83a..e9d384055494 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c | |||
@@ -265,7 +265,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size) | |||
265 | 265 | ||
266 | di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item); | 266 | di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item); |
267 | if (verify_dir_item(root, leaf, di)) | 267 | if (verify_dir_item(root, leaf, di)) |
268 | continue; | 268 | goto next; |
269 | 269 | ||
270 | name_len = btrfs_dir_name_len(leaf, di); | 270 | name_len = btrfs_dir_name_len(leaf, di); |
271 | total_size += name_len + 1; | 271 | total_size += name_len + 1; |