xfs
[Top] [All Lists]

[PATCH 06/16] patch xfs-inode-hash-fake

To: xfs@xxxxxxxxxxx
Subject: [PATCH 06/16] patch xfs-inode-hash-fake
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 8 Nov 2010 19:55:09 +1100
In-reply-to: <1289206519-18377-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1289206519-18377-1-git-send-email-david@xxxxxxxxxxxxx>
---
 fs/xfs/linux-2.6/xfs_iops.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 496455a..8b46867 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -753,6 +753,10 @@ xfs_diflags_to_iflags(
  * We are always called with an uninitialised linux inode here.
  * We need to initialise the necessary fields and take a reference
  * on it.
+ *
+ * We don't use the VFS inode hash for lookups anymore, so make the inode look
+ * hashed to the VFS by faking it. This avoids needing to touch inode hash
+ * locks in this path, but makes the VFS believe the inode is validly hashed.
  */
 void
 xfs_setup_inode(
@@ -764,7 +768,7 @@ xfs_setup_inode(
        inode->i_state = I_NEW;
 
        inode_sb_list_add(inode);
-       insert_inode_hash(inode);
+       hlist_nulls_add_fake(&inode->i_hash);
 
        inode->i_mode   = ip->i_d.di_mode;
        inode->i_nlink  = ip->i_d.di_nlink;
-- 
1.7.2.3

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