diff options
author | Anand Jain <anand.jain@oracle.com> | 2019-01-19 01:48:55 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-02-25 08:13:24 -0500 |
commit | 09ba3bc9dd150457c506e4661380a6183af651c1 (patch) | |
tree | 01349e5790ff3dade04f8651ccc29330a036f74b /fs/btrfs/ioctl.c | |
parent | 70bc7088aaedd7260fcdc18ecebc60881771acb3 (diff) |
btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index fd5f97aeb35c..3f9d7be30bf4 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1642,7 +1642,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, | |||
1642 | btrfs_info(fs_info, "resizing devid %llu", devid); | 1642 | btrfs_info(fs_info, "resizing devid %llu", devid); |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | device = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL); | 1645 | device = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true); |
1646 | if (!device) { | 1646 | if (!device) { |
1647 | btrfs_info(fs_info, "resizer unable to find device %llu", | 1647 | btrfs_info(fs_info, "resizer unable to find device %llu", |
1648 | devid); | 1648 | devid); |
@@ -3179,7 +3179,7 @@ static long btrfs_ioctl_dev_info(struct btrfs_fs_info *fs_info, | |||
3179 | 3179 | ||
3180 | rcu_read_lock(); | 3180 | rcu_read_lock(); |
3181 | dev = btrfs_find_device(fs_info->fs_devices, di_args->devid, s_uuid, | 3181 | dev = btrfs_find_device(fs_info->fs_devices, di_args->devid, s_uuid, |
3182 | NULL); | 3182 | NULL, true); |
3183 | 3183 | ||
3184 | if (!dev) { | 3184 | if (!dev) { |
3185 | ret = -ENODEV; | 3185 | ret = -ENODEV; |