diff options
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 57a7f331eb3e..77d7fbc0fa47 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1649,8 +1649,8 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) | |||
1649 | if (device->writeable) { | 1649 | if (device->writeable) { |
1650 | lock_chunks(root); | 1650 | lock_chunks(root); |
1651 | list_del_init(&device->dev_alloc_list); | 1651 | list_del_init(&device->dev_alloc_list); |
1652 | device->fs_devices->rw_devices--; | ||
1652 | unlock_chunks(root); | 1653 | unlock_chunks(root); |
1653 | root->fs_info->fs_devices->rw_devices--; | ||
1654 | clear_super = true; | 1654 | clear_super = true; |
1655 | } | 1655 | } |
1656 | 1656 | ||
@@ -1795,8 +1795,8 @@ error_undo: | |||
1795 | lock_chunks(root); | 1795 | lock_chunks(root); |
1796 | list_add(&device->dev_alloc_list, | 1796 | list_add(&device->dev_alloc_list, |
1797 | &root->fs_info->fs_devices->alloc_list); | 1797 | &root->fs_info->fs_devices->alloc_list); |
1798 | device->fs_devices->rw_devices++; | ||
1798 | unlock_chunks(root); | 1799 | unlock_chunks(root); |
1799 | root->fs_info->fs_devices->rw_devices++; | ||
1800 | } | 1800 | } |
1801 | goto error_brelse; | 1801 | goto error_brelse; |
1802 | } | 1802 | } |