diff options
| author | Anand Jain <[email protected]> | 2021-10-05 20:12:39 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2021-10-26 17:08:06 +0000 |
| commit | 8e906945c069fbc9377f2748a661ac06d039ea77 (patch) | |
| tree | e41d6cc6164117fc9f0424362941d63229826bca /fs/btrfs/dev-replace.c | |
| parent | btrfs: fix lost error handling when replaying directory deletes (diff) | |
| download | kernel-8e906945c069fbc9377f2748a661ac06d039ea77.tar.gz kernel-8e906945c069fbc9377f2748a661ac06d039ea77.zip | |
btrfs: use num_device to check for the last surviving seed device
For both sprout and seed fsids,
btrfs_fs_devices::num_devices provides device count including missing
btrfs_fs_devices::open_devices provides device count excluding missing
We create a dummy struct btrfs_device for the missing device, so
num_devices != open_devices when there is a missing device.
In btrfs_rm_devices() we wrongly check for %cur_devices->open_devices
before freeing the seed fs_devices. Instead we should check for
%cur_devices->num_devices.
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
