|
@@ -2026,6 +2026,9 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
|
|
|
|
|
|
cur_devices->num_devices--;
|
|
|
cur_devices->total_devices--;
|
|
|
+ /* Update total_devices of the parent fs_devices if it's seed */
|
|
|
+ if (cur_devices != fs_devices)
|
|
|
+ fs_devices->total_devices--;
|
|
|
|
|
|
if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state))
|
|
|
cur_devices->missing_devices--;
|