]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Btrfs: remove redundant check in rbio_can_merge
authorLiu Bo <bo.li.liu@oracle.com>
Mon, 4 Dec 2017 22:40:35 +0000 (15:40 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:20 +0000 (16:08 +0100)
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>
fs/btrfs/raid56.c

index a1dfdd35e7abf458d389c3c3b983b52b63a15684..945e940d23689c6879ba04897eb4a61490535379 100644 (file)
@@ -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;