aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/raid56.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2017-12-04 15:40:35 -0700
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:20 +0100
commitdb34be19c4f0f5512a4adf63713e4f5494618ead (patch)
treed68c3427f24c6d6e3a2fe55bc33c8b20c96c0f2f /fs/btrfs/raid56.c
parentbtrfs: minor style cleanups in btrfs_scan_one_device (diff)
downloadlinux-dev-db34be19c4f0f5512a4adf63713e4f5494618ead.tar.xz
linux-dev-db34be19c4f0f5512a4adf63713e4f5494618ead.zip
Btrfs: remove redundant check in rbio_can_merge
Given the above ' if (last->operation != cur->operation) return 0; ', it's guaranteed that two operations are same. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid56.c')
-rw-r--r--fs/btrfs/raid56.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index a1dfdd35e7ab..945e940d2368 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -594,12 +594,10 @@ static int rbio_can_merge(struct btrfs_raid_bio *last,
* bio list here, anyone else that wants to
* change this stripe needs to do their own rmw.
*/
- if (last->operation == BTRFS_RBIO_PARITY_SCRUB ||
- cur->operation == BTRFS_RBIO_PARITY_SCRUB)
+ if (last->operation == BTRFS_RBIO_PARITY_SCRUB)
return 0;
- if (last->operation == BTRFS_RBIO_REBUILD_MISSING ||
- cur->operation == BTRFS_RBIO_REBUILD_MISSING)
+ if (last->operation == BTRFS_RBIO_REBUILD_MISSING)
return 0;
return 1;