Commit b407ae3c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bd387db4
......@@ -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;
......
......@@ -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);
}
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment