Commit 2a09b575 authored by Changcheng Deng's avatar Changcheng Deng Committed by Darrick J. Wong

xfs: use swap() to make code cleaner

Use swap() in order to make code cleaner. Issue found by coccinelle.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarChangcheng Deng <deng.changcheng@zte.com.cn>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 0b9007ec
......@@ -564,8 +564,6 @@ xfs_lock_two_inodes(
struct xfs_inode *ip1,
uint ip1_mode)
{
struct xfs_inode *temp;
uint mode_temp;
int attempts = 0;
struct xfs_log_item *lp;
......@@ -578,12 +576,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;
mode_temp = ip0_mode;
ip0_mode = ip1_mode;
ip1_mode = mode_temp;
swap(ip0, ip1);
swap(ip0_mode, ip1_mode);
}
again:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment