xfs
[Top] [All Lists]

[PATCH 1/3] xfs: do not take the iolock in xfs_ireclaim

To: xfs@xxxxxxxxxxx
Subject: [PATCH 1/3] xfs: do not take the iolock in xfs_ireclaim
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 31 Jul 2009 17:03:41 -0400
References: <20090731210340.638586000@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.47-1
While the comment claims we need it to synchronize with inode cache lookups
that is not the case.  Today we make sure to always do an igrab in all
sync variants which do the proper checks for a deleted inode, and we also
have the proper checks in xfs_iget.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: linux-2.6/fs/xfs/xfs_iget.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_iget.c    2009-07-31 00:33:58.443352015 +0200
+++ linux-2.6/fs/xfs/xfs_iget.c 2009-07-31 00:34:02.742339834 +0200
@@ -507,13 +507,11 @@ xfs_ireclaim(
         * can reference the inodes in the cache without taking references.
         *
         * We make that OK here by ensuring that we wait until the inode is
-        * unlocked after the lookup before we go ahead and free it.  We get
-        * both the ilock and the iolock because the code may need to drop the
-        * ilock one but will still hold the iolock.
+        * unlocked after the lookup before we go ahead and free it.
         */
-       xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       xfs_ilock(ip, XFS_ILOCK_EXCL);
        xfs_qm_dqdetach(ip);
-       xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       xfs_iunlock(ip, XFS_ILOCK_EXCL);
 
        switch (ip->i_d.di_mode & S_IFMT) {
        case S_IFREG:

<Prev in Thread] Current Thread [Next in Thread>