public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4 linux-next] xfs: use swap() in xfs_dir2_leafn_rebalance()
@ 2015-05-18 17:13 Fabian Frederick
  2015-05-18 17:13 ` [PATCH 2/4 linux-next] xfs: use swap() in xfs_lock_two_inodes() Fabian Frederick
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Fabian Frederick @ 2015-05-18 17:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Dave Chinner, xfs

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-18 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-18 17:13 [PATCH 1/4 linux-next] xfs: use swap() in xfs_dir2_leafn_rebalance() Fabian Frederick
2015-05-18 17:13 ` [PATCH 2/4 linux-next] xfs: use swap() in xfs_lock_two_inodes() Fabian Frederick
2015-05-18 17:13 ` [PATCH 3/4 linux-next] xfs: use swap() in xfs_attr3_leaf_rebalance() Fabian Frederick
2015-05-18 17:13 ` [PATCH 4/4 linux-next] xfs: use swap() in xfs_da3_node_rebalance() Fabian Frederick
2015-05-18 17:19 ` [PATCH 1/4 linux-next] xfs: use swap() in xfs_dir2_leafn_rebalance() Al Viro
2015-05-18 18:06   ` Fabian Frederick
2015-05-18 21:37     ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox