diff options
| author | Anand Jain <[email protected]> | 2020-09-04 17:34:30 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2020-10-07 10:12:22 +0000 |
| commit | 2fca0db07608a303dbe9db802ecca678e358dca9 (patch) | |
| tree | 86eee6ef3563eb031520513468d6b2b8d91e4420 /fs/btrfs/dev-replace.c | |
| parent | btrfs: handle errors in btrfs_sysfs_add_fs_devices (diff) | |
| download | kernel-2fca0db07608a303dbe9db802ecca678e358dca9.tar.gz kernel-2fca0db07608a303dbe9db802ecca678e358dca9.zip | |
btrfs: reada: lock all seed/sprout devices in __reada_start_machine
On an fs mounted using a sprout device, the seed fs_devices are
maintained in a linked list under fs_info->fs_devices. Each seeds
fs_devices also has device_list_mutex initialized to protect against the
potential race with delete threads. But the delete thread (at
btrfs_rm_device()) is holding the fs_info::fs_devices::device_list_mutex
mutex which belongs to sprout device_list_mutex instead of seed
device_list_mutex. Moreover, there aren't any significient benefits in
using the seed::device_list_mutex instead of sprout::device_list_mutex.
So this patch converts them of using the seed::device_list_mutex to
sprout::device_list_mutex.
Reviewed-by: Nikolay Borisov <[email protected]>
Signed-off-by: Anand Jain <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
