: reiser4: export generic_{drop,forget}_inode, and fsync_super 1 of 2
Reiser4 is fairly self-contained, except for a few minor details. We thought it best to send the minor details in earlier than the rest of it.
We'll try to send the rest on the 20th, but one can never predict the exact pace of debugging....
Hans
Hello, Linus,
following patch exports fs/inode.c:generic_{drop,forget}_inode(), and fs/buffer.c:fsync_super().
Without access to generic_{drop,forget}_inode, file system that needs ->drop_inode() super block method would have to duplicate manipulations with &inode_unused, inodes_stat, and &inode_lock.
fsync_super() is required for reiser4, because during umount we want to perform some tasks after ->writepage has been called on all pages dirtied through mmap (that is, after fsync_super()), but before inode destruction. As a result, reiser4 cannot use kill_block_super() and has to call fsync_super() explicitly.
This is one of few changes reiser4 requires in the core.
Please, apply.
Hans on behalf of reiser4 team.
fs/buffer.c +1 -0
@@ -224,6 +224,7 @@ int fsync_super(struct super_block *sb)return sync_blockdev (sb->s_bdev); } +EXPORT_SYMBOL (fsync_super);/* * Write out and wait upon all dirty data associated with this
fs/inode.c +4 -2
@@ -938,7 +938,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;
@@ -965,19 +965,21 @@ static void generic_forget_inode(structclear_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
include/linux/fs.h +2 -1
@@ -1197,10 +1197,11 @@ extern struct inode * igrab(struct inodeextern 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 struct inode *ilookup5 (struct super_block *sb,unsigned long hashval,int (*test)(struct inode *,void *),void *data);extern struct inode *ilookup (struct super_block *sb,unsigned long ino); +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 );