Skip to content

Commit

Permalink
btrfs: No need to check !(flags & MS_RDONLY) twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Goldwyn Rodrigues authored and David Sterba committed Apr 18, 2017
1 parent 1a79c1f commit 4d339d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d339d0

Please sign in to comment.