lkml.org 
[lkml]   [2002]   [Oct]   [8]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromNikita Danilov <>
DateMon, 7 Oct 2002 18:09:44 +0400
Subject[PATCH]: export generic_{drop,forget}_inode()
Hello, Linus,

following patch exports fs/inode.c:generic_{drop,forget}_inode(). 
Without this, file system that needs ->drop_inode() super block method
would have to duplicate manipulations with &inode_unused, inodes_stat,
and &inode_lock.

This is one of few changes reiser4 requires in the core.

Please, apply.

Nikita.
diff -rup bk-linux-2.5/fs/inode.c bk-linux-2.5.new/fs/inode.c
--- bk-linux-2.5/fs/inode.c	Fri Oct  4 03:00:47 2002
+++ bk-linux-2.5.new/fs/inode.c	Mon Oct  7 14:42:08 2002
@@ -809,7 +809,7 @@ void generic_delete_inode(struct inode *
 }
 EXPORT_SYMBOL(generic_delete_inode);
 
-static void generic_forget_inode(struct inode *inode)
+void generic_forget_inode(struct inode *inode)
 {
 	struct super_block *sb = inode->i_sb;
 
@@ -836,19 +836,21 @@ static void generic_forget_inode(struct 
 	clear_inode(inode);
 	destroy_inode(inode);
 }
+EXPORT_SYMBOL(generic_forget_inode);
 
 /*
  * Normal UNIX filesystem behaviour: delete the
  * inode when the usage count drops to zero, and
  * i_nlink is zero.
  */
-static void generic_drop_inode(struct inode *inode)
+void generic_drop_inode(struct inode *inode)
 {
 	if (!inode->i_nlink)
 		generic_delete_inode(inode);
 	else
 		generic_forget_inode(inode);
 }
+EXPORT_SYMBOL(generic_drop_inode);
 
 /*
  * Called when we're dropping the last reference
diff -rup bk-linux-2.5/include/linux/fs.h bk-linux-2.5.new/include/linux/fs.h
--- bk-linux-2.5/include/linux/fs.h	Fri Oct  4 03:00:47 2002
+++ bk-linux-2.5.new/include/linux/fs.h	Mon Oct  7 14:42:08 2002
@@ -1202,6 +1202,8 @@ extern struct inode * igrab(struct inode
 extern ino_t iunique(struct super_block *, ino_t);
 extern int inode_needs_sync(struct inode *inode);
 extern void generic_delete_inode(struct inode *inode);
+extern void generic_drop_inode(struct inode *inode);
+extern void generic_forget_inode(struct inode *inode);
 
 extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
 extern struct inode * iget_locked(struct super_block *, unsigned long);
-
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 12:29    [from the cache]
©2003-2008