summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-09-03 17:35:45 +0400
committerChris Mason <clm@fb.com>2014-09-18 00:38:47 +0400
commit416d7b802a8bc044e98dc8bd96b59ce7a02287ac (patch)
treef7e5f2ae748c15f74aabc157bc2e233a7a0e1383 /fs
parent82372bc816d75722c24d1abadb11cd8c0a33883a (diff)
downloadlinux-416d7b802a8bc044e98dc8bd96b59ce7a02287ac.tar.xz
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')
-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;
}