From: Goldwyn Rodrigues Date: Sat, 4 Mar 2017 18:32:50 +0000 (-0600) Subject: btrfs: No need to check !(flags & MS_RDONLY) twice X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d339d01063a248b3deb3aff94aaf53be6e84e08;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git btrfs: No need to check !(flags & MS_RDONLY) twice Code cleanup. The code block is for !(*flags & MS_RDONLY). We don't need to check it again. Signed-off-by: Goldwyn Rodrigues Reviewed-by: Omar Sandoval Signed-off-by: David Sterba --- diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9530a333d302..6346876c97ea 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1788,8 +1788,7 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) } if (fs_info->fs_devices->missing_devices > - fs_info->num_tolerated_disk_barrier_failures && - !(*flags & MS_RDONLY)) { + fs_info->num_tolerated_disk_barrier_failures) { btrfs_warn(fs_info, "too many missing devices, writeable remount is not allowed"); ret = -EACCES;