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>
This commit is contained in:
Nikolay Borisov 2018-10-26 14:43:19 +03:00 committed by David Sterba
parent f9085abfae
commit 64bc6c2a34

View File

@ -2848,13 +2848,11 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans, u64 chunk_offset)
mutex_unlock(&fs_info->chunk_mutex); mutex_unlock(&fs_info->chunk_mutex);
} }
if (map->stripes[i].dev) { ret = btrfs_update_device(trans, device);
ret = btrfs_update_device(trans, map->stripes[i].dev); if (ret) {
if (ret) { mutex_unlock(&fs_devices->device_list_mutex);
mutex_unlock(&fs_devices->device_list_mutex); btrfs_abort_transaction(trans, ret);
btrfs_abort_transaction(trans, ret); goto out;
goto out;
}
} }
} }
mutex_unlock(&fs_devices->device_list_mutex); mutex_unlock(&fs_devices->device_list_mutex);