diff options
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0de4a2fcfb24..0f81d67cdc8d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1801,7 +1801,11 @@ static noinline int copy_to_sk(struct btrfs_root *root, | |||
1801 | item_off = btrfs_item_ptr_offset(leaf, i); | 1801 | item_off = btrfs_item_ptr_offset(leaf, i); |
1802 | item_len = btrfs_item_size_nr(leaf, i); | 1802 | item_len = btrfs_item_size_nr(leaf, i); |
1803 | 1803 | ||
1804 | if (item_len > BTRFS_SEARCH_ARGS_BUFSIZE) | 1804 | btrfs_item_key_to_cpu(leaf, key, i); |
1805 | if (!key_in_sk(key, sk)) | ||
1806 | continue; | ||
1807 | |||
1808 | if (sizeof(sh) + item_len > BTRFS_SEARCH_ARGS_BUFSIZE) | ||
1805 | item_len = 0; | 1809 | item_len = 0; |
1806 | 1810 | ||
1807 | if (sizeof(sh) + item_len + *sk_offset > | 1811 | if (sizeof(sh) + item_len + *sk_offset > |
@@ -1810,10 +1814,6 @@ static noinline int copy_to_sk(struct btrfs_root *root, | |||
1810 | goto overflow; | 1814 | goto overflow; |
1811 | } | 1815 | } |
1812 | 1816 | ||
1813 | btrfs_item_key_to_cpu(leaf, key, i); | ||
1814 | if (!key_in_sk(key, sk)) | ||
1815 | continue; | ||
1816 | |||
1817 | sh.objectid = key->objectid; | 1817 | sh.objectid = key->objectid; |
1818 | sh.offset = key->offset; | 1818 | sh.offset = key->offset; |
1819 | sh.type = key->type; | 1819 | sh.type = key->type; |