Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db2254bc authored by Liu Bo's avatar Liu Bo Committed by Chris Mason
Browse files

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: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 07140125
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;