lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1431969231-12834-2-git-send-email-fabf@skynet.be>
Date:	Mon, 18 May 2015 19:13:49 +0200
From:	Fabian Frederick <fabf@...net.be>
To:	linux-kernel@...r.kernel.org
Cc:	Fabian Frederick <fabf@...net.be>,
	Dave Chinner <david@...morbit.com>, xfs@....sgi.com
Subject: [PATCH 2/4 linux-next] xfs: use swap() in xfs_lock_two_inodes()

Use kernel.h macro definition.

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ