summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-07-02 16:46:46 +0300
committerDavid Sterba <dsterba@suse.com>2020-07-27 12:55:41 +0200
commitb7d2083a368332b40309c16bb2e7d48ecc920489 (patch)
treefa68d0678ed25b259d11f7f8f669c10ce46145fc /fs/btrfs
parent830258632757cad2ffb5cbc86f266ca475caf4af (diff)
btrfs: raid56: don't opencode swap() in __raid_recover_end_io
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/raid56.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index c09b1c228372..61ff77392357 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1862,11 +1862,8 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
}
/* make sure our ps and qs are in order */
- if (faila > failb) {
- int tmp = failb;
- failb = faila;
- faila = tmp;
- }
+ if (faila > failb)
+ swap(faila, failb);
/* if the q stripe is failed, do a pstripe reconstruction
* from the xors.