summaryrefslogtreecommitdiffstats
path: root/kernel/fs/btrfs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/btrfs/xattr.c')
-rw-r--r--kernel/fs/btrfs/xattr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/fs/btrfs/xattr.c b/kernel/fs/btrfs/xattr.c
index 6f518c90e..1fcd7b6e7 100644
--- a/kernel/fs/btrfs/xattr.c
+++ b/kernel/fs/btrfs/xattr.c
@@ -313,8 +313,10 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
/* check to make sure this item is what we want */
if (found_key.objectid != key.objectid)
break;
- if (found_key.type != BTRFS_XATTR_ITEM_KEY)
+ if (found_key.type > BTRFS_XATTR_ITEM_KEY)
break;
+ if (found_key.type < BTRFS_XATTR_ITEM_KEY)
+ goto next;
di = btrfs_item_ptr(leaf, slot, struct btrfs_dir_item);
if (verify_dir_item(root, leaf, di))