diff options
-rw-r--r-- | fs/btrfs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index b341da3ee3ee..6ab0df59b6c4 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -1340,6 +1340,12 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) | |||
1340 | if (ret) | 1340 | if (ret) |
1341 | goto restore; | 1341 | goto restore; |
1342 | } else { | 1342 | } else { |
1343 | if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state)) { | ||
1344 | btrfs_err(fs_info, | ||
1345 | "Remounting read-write after error is not allowed\n"); | ||
1346 | ret = -EINVAL; | ||
1347 | goto restore; | ||
1348 | } | ||
1343 | if (fs_info->fs_devices->rw_devices == 0) { | 1349 | if (fs_info->fs_devices->rw_devices == 0) { |
1344 | ret = -EACCES; | 1350 | ret = -EACCES; |
1345 | goto restore; | 1351 | goto restore; |