Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754074AbbERROp (ORCPT ); Mon, 18 May 2015 13:14:45 -0400 Received: from mailrelay116.isp.belgacom.be ([195.238.20.143]:57530 "EHLO mailrelay116.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752414AbbERROE (ORCPT ); Mon, 18 May 2015 13:14:04 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=Ax9Kd9og7W2htzcJF9odWb+87PP6pPoG1t8Q07ebhfo= c=1 sm=2 a=cWQz9rFMyc8lw6lPcaYA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CgDgCOHFpV/4FIiNlcgxCBMrJzBQGBBJhIBAICgTM8EQEBAQEBAQGBCkEDg18BAQQnLyMQUTkeGYgwAdhTASuGFoopBxaEFwWdX40FigcjYYMZPDGCRgEBAQ From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Dave Chinner , xfs@oss.sgi.com Subject: [PATCH 2/4 linux-next] xfs: use swap() in xfs_lock_two_inodes() Date: Mon, 18 May 2015 19:13:49 +0200 Message-Id: <1431969231-12834-2-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.4.0 In-Reply-To: <1431969231-12834-1-git-send-email-fabf@skynet.be> References: <1431969231-12834-1-git-send-email-fabf@skynet.be> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 987 Lines: 41 Use kernel.h macro definition. Signed-off-by: Fabian Frederick --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/