mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
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:
parent
f9085abfae
commit
64bc6c2a34
@ -2848,15 +2848,13 @@ 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);
|
||||
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);
|
||||
|
||||
ret = btrfs_free_chunk(trans, chunk_offset);
|
||||
|
Loading…
Reference in New Issue
Block a user