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 2/4 linux-next] xfs: use swap() in xfs_lock_two_inodes()
Date
Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
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


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