diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2014-09-03 09:35:35 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 16:38:35 -0400 |
commit | 5d778aaeb013bf819d00e33de7c673c04b5c4886 (patch) | |
tree | fbc593e27b5e4aa7dbc9300bff26e247f6e321be /fs | |
parent | ce7213c70c37e3a66bc0b50c45edcbfea505f62f (diff) |
Btrfs: Fix wrong free_chunk_space assignment during removing a device
During removing a device, we have modified free_chunk_space when we
shrink the device, so we needn't assign a new value to it after
the device shrink. Fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f8273bb53b3f..1524b3f44036 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1671,11 +1671,6 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) | |||
1671 | if (ret) | 1671 | if (ret) |
1672 | goto error_undo; | 1672 | goto error_undo; |
1673 | 1673 | ||
1674 | spin_lock(&root->fs_info->free_chunk_lock); | ||
1675 | root->fs_info->free_chunk_space = device->total_bytes - | ||
1676 | device->bytes_used; | ||
1677 | spin_unlock(&root->fs_info->free_chunk_lock); | ||
1678 | |||
1679 | device->in_fs_metadata = 0; | 1674 | device->in_fs_metadata = 0; |
1680 | btrfs_scrub_cancel_dev(root->fs_info, device); | 1675 | btrfs_scrub_cancel_dev(root->fs_info, device); |
1681 | 1676 | ||