summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2004-09-02 20:29:39 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-02 20:29:39 -0700
commitb407ae3cbe06e6252493079d70ab09e48a604656 (patch)
tree1c829ae6a8743c354b03b60c1f6535b210e43ee7
parentbd387db4934a633d762d801a250c819161a28c91 (diff)
[PATCH] stop ->put_inode abuse in vxfs
->clear_inode is the right place to free private inode parts. No idea what I though when using ->put_inode and i_count check. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/freevxfs/vxfs_extern.h2
-rw-r--r--fs/freevxfs/vxfs_inode.c11
-rw-r--r--fs/freevxfs/vxfs_super.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/fs/freevxfs/vxfs_extern.h b/fs/freevxfs/vxfs_extern.h
index 0e4cc9ff505e..d8be917f9797 100644
--- a/fs/freevxfs/vxfs_extern.h
+++ b/fs/freevxfs/vxfs_extern.h
@@ -59,7 +59,7 @@ extern void vxfs_put_fake_inode(struct inode *);
extern struct vxfs_inode_info * vxfs_blkiget(struct super_block *, u_long, ino_t);
extern struct vxfs_inode_info * vxfs_stiget(struct super_block *, ino_t);
extern void vxfs_read_inode(struct inode *);
-extern void vxfs_put_inode(struct inode *);
+extern void vxfs_clear_inode(struct inode *);
/* vxfs_lookup.c */
extern struct inode_operations vxfs_dir_inode_ops;
diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c
index f4b891eb0d7e..9672d2facffe 100644
--- a/fs/freevxfs/vxfs_inode.c
+++ b/fs/freevxfs/vxfs_inode.c
@@ -337,16 +337,15 @@ vxfs_read_inode(struct inode *ip)
}
/**
- * vxfs_put_inode - remove inode from main memory
+ * vxfs_clear_inode - remove inode from main memory
* @ip: inode to discard.
*
* Description:
- * vxfs_put_inode() is called on each iput. If we are the last
- * link in memory, free the fspriv inode area.
+ * vxfs_clear_inode() is called on the final iput and frees the private
+ * inode area.
*/
void
-vxfs_put_inode(struct inode *ip)
+vxfs_clear_inode(struct inode *ip)
{
- if (atomic_read(&ip->i_count) == 1)
- kmem_cache_free(vxfs_inode_cachep, ip->u.generic_ip);
+ kmem_cache_free(vxfs_inode_cachep, ip->u.generic_ip);
}
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c
index 8fcec56e9ad4..0ae2c7b8182a 100644
--- a/fs/freevxfs/vxfs_super.c
+++ b/fs/freevxfs/vxfs_super.c
@@ -60,7 +60,7 @@ static int vxfs_remount(struct super_block *, int *, char *);
static struct super_operations vxfs_super_ops = {
.read_inode = vxfs_read_inode,
- .put_inode = vxfs_put_inode,
+ .clear_inode = vxfs_clear_inode,
.put_super = vxfs_put_super,
.statfs = vxfs_statfs,
.remount_fs = vxfs_remount,