diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 915ac14c2064..acd2df85bed5 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -1226,6 +1226,15 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) | |||
1226 | goto restore; | 1226 | goto restore; |
1227 | } | 1227 | } |
1228 | 1228 | ||
1229 | if (fs_info->fs_devices->missing_devices > | ||
1230 | fs_info->num_tolerated_disk_barrier_failures && | ||
1231 | !(*flags & MS_RDONLY)) { | ||
1232 | printk(KERN_WARNING | ||
1233 | "Btrfs: too many missing devices, writeable remount is not allowed\n"); | ||
1234 | ret = -EACCES; | ||
1235 | goto restore; | ||
1236 | } | ||
1237 | |||
1229 | if (btrfs_super_log_root(fs_info->super_copy) != 0) { | 1238 | if (btrfs_super_log_root(fs_info->super_copy) != 0) { |
1230 | ret = -EINVAL; | 1239 | ret = -EINVAL; |
1231 | goto restore; | 1240 | goto restore; |