diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-10-26 14:43:19 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:36 +0100 |
commit | 64bc6c2a34535515f8319b2054795f0ca0b842f9 (patch) | |
tree | 5a20fc391513a6cbdf50c5d67674926832503e25 /fs/btrfs | |
parent | f9085abfaeaf45971044fad2281ffd917cde4526 (diff) | |
download | linux-64bc6c2a34535515f8319b2054795f0ca0b842f9.tar.bz2 |
btrfs: Remove superfluous check form btrfs_remove_chunk
It's unnecessary to check map->stripes[i].dev for NULL given its value
is already set and dereferenced above the the check. No functional
changes.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index fc9a3d8f6238..0839fae337f6 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2848,13 +2848,11 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset) mutex_unlock(&fs_info->chunk_mutex); } - if (map->stripes[i].dev) { - ret = btrfs_update_device(trans, map->stripes[i].dev); - if (ret) { - mutex_unlock(&fs_devices->device_list_mutex); - btrfs_abort_transaction(trans, ret); - goto out; - } + ret = btrfs_update_device(trans, device); + if (ret) { + mutex_unlock(&fs_devices->device_list_mutex); + btrfs_abort_transaction(trans, ret); + goto out; } } mutex_unlock(&fs_devices->device_list_mutex); |