aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-09-03 21:35:45 +0800
committerChris Mason <clm@fb.com>2014-09-17 13:38:47 -0700
commit416d7b802a8bc044e98dc8bd96b59ce7a02287ac (patch)
treef7e5f2ae748c15f74aabc157bc2e233a7a0e1383 /fs/btrfs
parentBtrfs: make the logic of source device removing more clear (diff)
downloadlinux-dev-416d7b802a8bc044e98dc8bd96b59ce7a02287ac.tar.xz
linux-dev-416d7b802a8bc044e98dc8bd96b59ce7a02287ac.zip
Btrfs: stop mounting the fs if the non-ENOENT errors happen when opening seed fs
When we open a seed filesystem, if the degraded mount option is set, we continue to mount the fs if we don't find some devices in the seed filesystem. But we should stop mounting if other errors happen. Fix it Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-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 2e078fa705a6..fbe4ead7e22f 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6093,7 +6093,7 @@ static int read_one_dev(struct btrfs_root *root,
if (memcmp(fs_uuid, root->fs_info->fsid, BTRFS_UUID_SIZE)) {
ret = open_seed_devices(root, fs_uuid);
- if (ret && !btrfs_test_opt(root, DEGRADED))
+ if (ret && !(ret == -ENOENT && btrfs_test_opt(root, DEGRADED)))
return ret;
}