xfs
[Top] [All Lists]

[PATCH] Use xfs_trans_ijoin in xfs_trans_iget

Subject: [PATCH] Use xfs_trans_ijoin in xfs_trans_iget
From: Niv Sardi <xaiki@xxxxxxxxxx>
Date: Wed, 23 Jul 2008 11:27:20 +1000
Avoid some code duplication

Signed-off-by: Niv Sardi <xaiki@xxxxxxx>
---
 fs/xfs/xfs_trans_inode.c |   30 +-----------------------------
 1 files changed, 1 insertions(+), 29 deletions(-)

diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c
index 2a1c0f0..1dbcbe9 100644
--- a/fs/xfs/xfs_trans_inode.c
+++ b/fs/xfs/xfs_trans_inode.c
@@ -138,35 +138,7 @@ xfs_trans_iget(
        }
        ASSERT(ip != NULL);
 
-       /*
-        * Get a log_item_desc to point at the new item.
-        */
-       if (ip->i_itemp == NULL)
-               xfs_inode_item_init(ip, mp);
-       iip = ip->i_itemp;
-       (void) xfs_trans_add_item(tp, (xfs_log_item_t *)(iip));
-
-       xfs_trans_inode_broot_debug(ip);
-
-       /*
-        * If the IO lock has been acquired, mark that in
-        * the inode log item so we'll know to unlock it
-        * when the transaction commits.
-        */
-       ASSERT(iip->ili_flags == 0);
-       if (lock_flags & XFS_IOLOCK_EXCL) {
-               iip->ili_flags |= XFS_ILI_IOLOCKED_EXCL;
-       } else if (lock_flags & XFS_IOLOCK_SHARED) {
-               iip->ili_flags |= XFS_ILI_IOLOCKED_SHARED;
-       }
-
-       /*
-        * Initialize i_transp so we can find it with xfs_inode_incore()
-        * above.
-        */
-       ip->i_transp = tp;
-
-       *ipp = ip;
+       xfs_trans_ijoin(tp, ip, lock_flags);
        return 0;
 }
 
-- 
1.5.6


--=-=-=


Cheers,
-- 
Niv Sardi

--=-=-=--


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] Use xfs_trans_ijoin in xfs_trans_iget, Niv Sardi <=