summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-07-16 18:38:01 +0800
committerChris Mason <clm@fb.com>2014-08-19 08:52:10 -0700
commit3a7d55c84c76a3088ddfb798c187182143683a16 (patch)
treeaa8207c5030d654a2897e7363a6d4a2e7bd6a1d6 /fs/btrfs/volumes.c
parent69611ac810af8e88eeb5ebd851589a0e8cc90860 (diff)
downloadblackbird-op-linux-3a7d55c84c76a3088ddfb798c187182143683a16.tar.gz
blackbird-op-linux-3a7d55c84c76a3088ddfb798c187182143683a16.zip
Btrfs: fix wrong missing device counter decrease
The missing devices are accounted by its own fs device, for example the missing devices in seed filesystem will be accounted by the fs device of the seed filesystem, not by the new filesystem which is based on the seed filesystem, so when we remove the missing device in the seed filesystem, we should decrease the counter of its own fs device. Fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 50edbbc2e76c..da0e632a21fc 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1718,7 +1718,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
device->fs_devices->total_devices--;
if (device->missing)
- root->fs_info->fs_devices->missing_devices--;
+ device->fs_devices->missing_devices--;
next_device = list_entry(root->fs_info->fs_devices->devices.next,
struct btrfs_device, dev_list);
OpenPOWER on IntegriCloud