Skip to content

Commit

Permalink
Btrfs: fix an while-loop of listxattr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Bo authored and Chris Mason committed Dec 17, 2012
1 parent 0714012 commit db2254b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)

di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item);
if (verify_dir_item(root, leaf, di))
continue;
goto next;

name_len = btrfs_dir_name_len(leaf, di);
total_size += name_len + 1;
Expand Down

0 comments on commit db2254b

Please sign in to comment.