From: Nikita Danilov <Nikita@Namesys.COM>
To: Linus Torvalds <Torvalds@Transmeta.COM>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>,
Reiserfs developers mail-list <Reiserfs-Dev@Namesys.COM>,
Alexander Viro <viro@math.psu.edu>
Subject: [PATCH]: export generic_{drop,forget}_inode()
Date: Mon, 7 Oct 2002 18:09:44 +0400 [thread overview]
Message-ID: <15777.38312.339615.506366@laputa.namesys.com> (raw)
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);
reply other threads:[~2002-10-08 8:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15777.38312.339615.506366@laputa.namesys.com \
--to=nikita@namesys.com \
--cc=Linux-Kernel@Vger.Kernel.ORG \
--cc=Reiserfs-Dev@Namesys.COM \
--cc=Torvalds@Transmeta.COM \
--cc=viro@math.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).