btrfs: No need to check !(flags & MS_RDONLY) twice
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Sat, 4 Mar 2017 18:32:50 +0000 (12:32 -0600)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:25 +0000 (14:07 +0200)
Code cleanup.
The code block is for !(*flags & MS_RDONLY). We don't need
to check it again.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c

index 9530a333d302c0c13c3e8463814b642a023afc23..6346876c97ea485fb5321bcd826e03c3f06ed530 100644 (file)
@@ -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;