diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 6104676857f5..6cb82f62cb7c 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1680,11 +1680,11 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) | |||
1680 | if (device->bdev == root->fs_info->fs_devices->latest_bdev) | 1680 | if (device->bdev == root->fs_info->fs_devices->latest_bdev) |
1681 | root->fs_info->fs_devices->latest_bdev = next_device->bdev; | 1681 | root->fs_info->fs_devices->latest_bdev = next_device->bdev; |
1682 | 1682 | ||
1683 | if (device->bdev) | 1683 | if (device->bdev) { |
1684 | device->fs_devices->open_devices--; | 1684 | device->fs_devices->open_devices--; |
1685 | 1685 | /* remove sysfs entry */ | |
1686 | /* remove sysfs entry */ | 1686 | btrfs_kobj_rm_device(root->fs_info, device); |
1687 | btrfs_kobj_rm_device(root->fs_info, device); | 1687 | } |
1688 | 1688 | ||
1689 | call_rcu(&device->rcu, free_device); | 1689 | call_rcu(&device->rcu, free_device); |
1690 | 1690 | ||