[PATCH 06/16] patch xfs-inode-hash-fake
Dave Chinner
david at fromorbit.com
Mon Nov 8 02:55:09 CST 2010
---
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
More information about the xfs
mailing list