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>
This commit is contained in:
parent
071401258a
commit
db2254bce4
|
@ -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);
|
di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item);
|
||||||
if (verify_dir_item(root, leaf, di))
|
if (verify_dir_item(root, leaf, di))
|
||||||
continue;
|
goto next;
|
||||||
|
|
||||||
name_len = btrfs_dir_name_len(leaf, di);
|
name_len = btrfs_dir_name_len(leaf, di);
|
||||||
total_size += name_len + 1;
|
total_size += name_len + 1;
|
||||||
|
|
Loading…
Reference in New Issue