lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4 linux-next] xfs: use swap() in xfs_dir2_leafn_rebalance()
Date
Use kernel.h macro definition.
Also remove assignment in if condition (checkpatch error)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/xfs/libxfs/xfs_dir2_node.c | 8 ++------

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/xfs/libxfs/xfs_dir2_node.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs/xfs_dir2_node.c
index 41b80d3..84442a6 100644
--- a/fs/xfs/libxfs/xfs_dir2_node.c
+++ b/fs/xfs/libxfs/xfs_dir2_node.c
@@ -967,13 +967,10 @@ xfs_dir2_leafn_rebalance(
/*
* If the block order is wrong, swap the arguments.
*/
- if ((swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp))) {
- xfs_da_state_blk_t *tmp; /* temp for block swap */
+ swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp);
+ if (swap)
+ swap(blk1, blk2);

- tmp = blk1;
- blk1 = blk2;
- blk2 = tmp;
- }
leaf1 = blk1->bp->b_addr;
leaf2 = blk2->bp->b_addr;
dp->d_ops->leaf_hdr_from_disk(&hdr1, leaf1);
--
2.4.0


\
 
 \ /
  Last update: 2015-05-18 20:01    [W:0.056 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site