+++ /dev/null
- fs/inode.c | 17 +++++++++++++++++
- include/linux/fs.h | 1 +
- 2 files changed, 18 insertions(+)
-
---- linux-2.5.73/fs/inode.c~inode_unhash_2.5.75 2003-06-22 12:33:34.000000000 -0600
-+++ linux-2.5.73-braam/fs/inode.c 2003-07-15 02:15:24.000000000 -0600
-@@ -272,6 +272,18 @@ static void dispose_list(struct list_hea
- spin_unlock(&inode_lock);
- }
-
-+/** unhash_notify - notify the FS that an inode is being unhashed
-+ * @inode: inode being unhashed
-+ *
-+ * the unhash_inode method must not block
-+ */
-+static void unhash_notify(struct inode *inode)
-+{
-+ if (inode->i_sb && inode->i_sb->s_op &&
-+ inode->i_sb->s_op->unhash_inode)
-+ inode->i_sb->s_op->unhash_inode(inode);
-+}
-+
- /*
- * Invalidate all inodes for a device.
- */
-@@ -293,6 +305,7 @@ static int invalidate_list(struct list_h
- continue;
- invalidate_inode_buffers(inode);
- if (!atomic_read(&inode->i_count)) {
-+ unhash_notify(inode);
- hlist_del_init(&inode->i_hash);
- list_del(&inode->i_list);
- list_add(&inode->i_list, dispose);
-@@ -429,6 +442,7 @@ static void prune_icache(int nr_to_scan)
- if (!can_unuse(inode))
- continue;
- }
-+ unhash_notify(inode);
- hlist_del_init(&inode->i_hash);
- list_move(&inode->i_list, &freeable);
- inode->i_state |= I_FREEING;
-@@ -938,6 +952,7 @@ void __insert_inode_hash(struct inode *i
- void remove_inode_hash(struct inode *inode)
- {
- spin_lock(&inode_lock);
-+ unhash_notify(inode);
- hlist_del_init(&inode->i_hash);
- spin_unlock(&inode_lock);
- }
-@@ -977,6 +992,7 @@ void generic_delete_inode(struct inode *
- } else
- clear_inode(inode);
- spin_lock(&inode_lock);
-+ unhash_notify(inode);
- hlist_del_init(&inode->i_hash);
- spin_unlock(&inode_lock);
- wake_up_inode(inode);
-@@ -1002,6 +1018,7 @@ static void generic_forget_inode(struct
- write_inode_now(inode, 1);
- spin_lock(&inode_lock);
- inodes_stat.nr_unused--;
-+ unhash_notify(inode);
- hlist_del_init(&inode->i_hash);
- }
- list_del_init(&inode->i_list);
---- linux-2.5.73/include/linux/fs.h~inode_unhash_2.5.75 2003-07-01 11:13:41.000000000 -0600
-+++ linux-2.5.73-braam/include/linux/fs.h 2003-07-15 02:11:47.000000000 -0600
-@@ -799,6 +799,7 @@ struct super_operations {
- int (*statfs) (struct super_block *, struct kstatfs *);
- int (*remount_fs) (struct super_block *, int *, char *);
- void (*clear_inode) (struct inode *);
-+ void (*unhash_inode) (struct inode *);
- void (*umount_begin) (struct super_block *);
-
- int (*show_options)(struct seq_file *, struct vfsmount *);
-
-_