]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove redundant code from btrfs_free_stale_devices
authorNikolay Borisov <nborisov@suse.com>
Wed, 22 Jul 2020 08:09:24 +0000 (11:09 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:12:15 +0000 (12:12 +0200)
commit72ee1ca37eba7e1172e49a755e438b769802a0b9
treed582c80e90a7e5d84ebff9284e2bffff912935ec
parentf235386c665c0933ca79fa3a60e6f3b69a50732d
btrfs: remove redundant code from btrfs_free_stale_devices

Following the refactor of btrfs_free_stale_devices in
f48e34b2577a ("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 in
7d900957766a ("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>
fs/btrfs/volumes.c