[BK]: reiser4: export generic_{drop,forget}_inode, and fsync_super 1 of 2

From: Hans Reiser (reiser@namesys.com)
Date: Wed Oct 16 2002 - 10:40:24 EST


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


attached mail follows:


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.
diff -X dontdiff -rup bk-linux-2.5/fs/buffer.c linux-2.5-reiser4/fs/buffer.c
--- bk-linux-2.5/fs/buffer.c Mon Oct 14 17:41:05 2002
+++ linux-2.5-reiser4/fs/buffer.c Tue Oct 15 11:27:32 2002
@@ -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
diff -X dontdiff -rup bk-linux-2.5/fs/inode.c linux-2.5-reiser4/fs/inode.c
--- bk-linux-2.5/fs/inode.c Mon Oct 14 17:41:05 2002
+++ linux-2.5-reiser4/fs/inode.c Tue Oct 15 11:27:32 2002
@@ -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(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 -X dontdiff -rup bk-linux-2.5/include/linux/fs.h linux-2.5-reiser4/include/linux/fs.h
--- bk-linux-2.5/include/linux/fs.h Sun Oct 13 03:01:04 2002
+++ linux-2.5-reiser4/include/linux/fs.h Mon Oct 14 15:01:26 2002
@@ -1197,10 +1197,11 @@ 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 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);

-
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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:28 EST