|
@@ -10903,8 +10903,8 @@ int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range)
|
|
"failed to trim %llu block group(s), last error %d",
|
|
"failed to trim %llu block group(s), last error %d",
|
|
bg_failed, bg_ret);
|
|
bg_failed, bg_ret);
|
|
mutex_lock(&fs_info->fs_devices->device_list_mutex);
|
|
mutex_lock(&fs_info->fs_devices->device_list_mutex);
|
|
- devices = &fs_info->fs_devices->alloc_list;
|
|
|
|
- list_for_each_entry(device, devices, dev_alloc_list) {
|
|
|
|
|
|
+ devices = &fs_info->fs_devices->devices;
|
|
|
|
+ list_for_each_entry(device, devices, dev_list) {
|
|
ret = btrfs_trim_free_extents(device, range->minlen,
|
|
ret = btrfs_trim_free_extents(device, range->minlen,
|
|
&group_trimmed);
|
|
&group_trimmed);
|
|
if (ret) {
|
|
if (ret) {
|