lkml.org 
[lkml]   [2003]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] remove anon_hash_chain
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.


- James
--
James Morris
<jmorris@intercode.com.au>

diff -purN -X dontdiff bk.pending/fs/inode.c bk.w1/fs/inode.c
--- bk.pending/fs/inode.c 2003-06-12 10:57:14.000000000 +1000
+++ bk.w1/fs/inode.c 2003-06-12 11:36:44.255403074 +1000
@@ -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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.041 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site