diff options
author | Anand Jain <Anand.Jain@oracle.com> | 2018-01-04 18:01:54 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 16:08:20 +0100 |
commit | 61ecda68652591c3a7131e6bdb51639612a1244c (patch) | |
tree | ea413ada87680ddc9f3aeea750d20e6c215780a8 | |
parent | 8810f7517a3bc4ca2d41d022446d3f5fd6b77c09 (diff) | |
download | linux-stable-61ecda68652591c3a7131e6bdb51639612a1244c.tar.gz linux-stable-61ecda68652591c3a7131e6bdb51639612a1244c.tar.bz2 linux-stable-61ecda68652591c3a7131e6bdb51639612a1244c.zip |
btrfs: remove check for BTRFS_FS_STATE_ERROR which we just set
__btrfs_handle_fs_error() sets BTRFS_FS_STATE_ERROR, and calls
btrfs_handle_error() so no need to check if the BTRFS_FS_STATE_ERROR
is set in btrfs_handle_error(). And there is no other user of
btrfs_handle_error() as well.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/super.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 8af7590a5638..786e8bc04f9c 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -115,20 +115,18 @@ static void btrfs_handle_error(struct btrfs_fs_info *fs_info) if (sb_rdonly(sb)) return; - if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) { - sb->s_flags |= SB_RDONLY; - btrfs_info(fs_info, "forced readonly"); - /* - * Note that a running device replace operation is not - * canceled here although there is no way to update - * the progress. It would add the risk of a deadlock, - * therefore the canceling is omitted. The only penalty - * is that some I/O remains active until the procedure - * completes. The next time when the filesystem is - * mounted writeable again, the device replace - * operation continues. - */ - } + sb->s_flags |= SB_RDONLY; + btrfs_info(fs_info, "forced readonly"); + /* + * Note that a running device replace operation is not + * canceled here although there is no way to update + * the progress. It would add the risk of a deadlock, + * therefore the canceling is omitted. The only penalty + * is that some I/O remains active until the procedure + * completes. The next time when the filesystem is + * mounted writeable again, the device replace + * operation continues. + */ } /* |