* [PATCH]: export generic_{drop,forget}_inode()
@ 2002-10-07 14:09 Nikita Danilov
0 siblings, 0 replies; only message in thread
From: Nikita Danilov @ 2002-10-07 14:09 UTC (permalink / raw)
To: Linus Torvalds
Cc: Linux Kernel Mailing List, Reiserfs developers mail-list, Alexander Viro
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-10-08 8:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-07 14:09 [PATCH]: export generic_{drop,forget}_inode() Nikita Danilov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).