
From: James Morris <jmorris@intercode.com.au>

This patch against current bk removes anon_hash_chain from fs/inode.c, as
all inodes in the 2.5 kernel must be associated with a superblock, and the
anon hash is no longer needed.

(akpm: Well there's one inode with a null i_sb: swapper_inode.  But it
shouldn't get here and if it does, we'll fix it by other means).



 fs/inode.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff -puN fs/inode.c~remove_anon_hash_chain fs/inode.c
--- 25/fs/inode.c~remove_anon_hash_chain	2003-06-11 20:25:09.000000000 -0700
+++ 25-akpm/fs/inode.c	2003-06-11 20:25:09.000000000 -0700
@@ -71,7 +71,6 @@ static unsigned int i_hash_shift;
 LIST_HEAD(inode_in_use);
 LIST_HEAD(inode_unused);
 static struct hlist_head *inode_hashtable;
-static HLIST_HEAD(anon_hash_chain); /* for inodes with NULL i_sb */
 
 /*
  * A simple spinlock to protect the list manipulations.
@@ -918,15 +917,12 @@ EXPORT_SYMBOL(iget_locked);
  *	@hashval: unsigned long value used to locate this object in the
  *		inode_hashtable.
  *
- *	Add an inode to the inode hash for this superblock. If the inode
- *	has no superblock it is added to a separate anonymous chain.
+ *	Add an inode to the inode hash for this superblock.
  */
  
 void __insert_inode_hash(struct inode *inode, unsigned long hashval)
 {
-	struct hlist_head *head = &anon_hash_chain;
-	if (inode->i_sb)
-		head = inode_hashtable + hash(inode->i_sb, hashval);
+	struct hlist_head *head = inode_hashtable + hash(inode->i_sb, hashval);
 	spin_lock(&inode_lock);
 	hlist_add_head(&inode->i_hash, head);
 	spin_unlock(&inode_lock);
@@ -936,7 +932,7 @@ void __insert_inode_hash(struct inode *i
  *	remove_inode_hash - remove an inode from the hash
  *	@inode: inode to unhash
  *
- *	Remove an inode from the superblock or anonymous hash.
+ *	Remove an inode from the superblock.
  */
  
 void remove_inode_hash(struct inode *inode)

_
