Messages in this thread Patch in this message | | | From | Fabian Frederick <> | Subject | [PATCH 2/4 linux-next] xfs: use swap() in xfs_lock_two_inodes() | Date | Mon, 18 May 2015 19:13:49 +0200 |
| |
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
| |