]> git.hungrycats.org Git - linux/commitdiff
Revert "btrfs: increase output size for LOGICAL_INO_V2 ioctl"
authorZygo Blaxell <zblaxell@waya.furryterror.org>
Fri, 22 Sep 2017 14:23:40 +0000 (10:23 -0400)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Fri, 22 Sep 2017 14:23:40 +0000 (10:23 -0400)
This reverts commit 41482f237cc9d5aceb2c3f0255e9e3e4f45f545b.

fs/btrfs/ioctl.c

index 4be9b1791f58eee606264bc9c7f1adb3cbf14e76..2bc3a9588d1d24f1b31a427b5774d4ed15d4c903 100644 (file)
@@ -4554,7 +4554,6 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_fs_info *fs_info,
 
        if (version == 1) {
                ignore_offset = false;
-               size = min_t(u32, loi->size, SZ_64K);
        } else {
                /* Only accept flags we have defined so far */
                if (loi->flags & ~(BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET)) {
@@ -4562,7 +4561,6 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_fs_info *fs_info,
                        goto out_loi;
                }
                ignore_offset = loi->flags & BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET;
-               size = min_t(u32, loi->size, SZ_16M);
        }
 
        path = btrfs_alloc_path();
@@ -4571,6 +4569,7 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_fs_info *fs_info,
                goto out;
        }
 
+       size = min_t(u32, loi->size, SZ_64K);
        inodes = init_data_container(size);
        if (IS_ERR(inodes)) {
                ret = PTR_ERR(inodes);