[PATCH 2/4 linux-next] xfs: use swap() in xfs_lock_two_inodes()

From: Fabian Frederick
Date: Mon May 18 2015 - 13:14:49 EST


Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
fs/xfs/xfs_inode.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index d6ebc85..d4f3a09 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -500,7 +500,6 @@ xfs_lock_two_inodes(
xfs_inode_t *ip1,
uint lock_mode)
{
- xfs_inode_t *temp;
int attempts = 0;
xfs_log_item_t *lp;

@@ -512,11 +511,8 @@ xfs_lock_two_inodes(

ASSERT(ip0->i_ino != ip1->i_ino);

- if (ip0->i_ino > ip1->i_ino) {
- temp = ip0;
- ip0 = ip1;
- ip1 = temp;
- }
+ if (ip0->i_ino > ip1->i_ino)
+ swap(ip0, ip1);

again:
xfs_ilock(ip0, xfs_lock_inumorder(lock_mode, 0));
--
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/