mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 18:30:06 +00:00
btrfs: remove redundant code from btrfs_free_stale_devices
Following the refactor of btrfs_free_stale_devices in7bcb8164ad
("btrfs: use device_list_mutex when removing stale devices") fs_devices are freed after they have been iterated by the inner list_for_each so the use-after-free fixed by introducing the break infd649f10c3
("btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device") is no longer necessary. Just remove it altogether. No functional changes. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
44cab9ba37
commit
4ae312e972
1 changed files with 0 additions and 2 deletions
|
@ -595,8 +595,6 @@ static int btrfs_free_stale_devices(const char *path,
|
|||
btrfs_free_device(device);
|
||||
|
||||
ret = 0;
|
||||
if (fs_devices->num_devices == 0)
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&fs_devices->device_list_mutex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue