diff options
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1ea19cea96d0..7b61ea3141e5 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -8477,7 +8477,7 @@ int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput) | |||
8477 | { | 8477 | { |
8478 | int ret; | 8478 | int ret; |
8479 | 8479 | ||
8480 | if (root->fs_info->sb->s_flags & MS_RDONLY) | 8480 | if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state)) |
8481 | return -EROFS; | 8481 | return -EROFS; |
8482 | 8482 | ||
8483 | ret = __start_delalloc_inodes(root, delay_iput); | 8483 | ret = __start_delalloc_inodes(root, delay_iput); |
@@ -8503,7 +8503,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int delay_iput) | |||
8503 | struct list_head splice; | 8503 | struct list_head splice; |
8504 | int ret; | 8504 | int ret; |
8505 | 8505 | ||
8506 | if (fs_info->sb->s_flags & MS_RDONLY) | 8506 | if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) |
8507 | return -EROFS; | 8507 | return -EROFS; |
8508 | 8508 | ||
8509 | INIT_LIST_HEAD(&splice); | 8509 | INIT_LIST_HEAD(&splice); |