X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Ffreevxfs%2Fvxfs_inode.c;h=f544aae9169fb86847a0794006dde0a73910291e;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=f4b891eb0d7e9481828bcfbee0a34e7571ba4a87;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c index f4b891eb0..f544aae91 100644 --- a/fs/freevxfs/vxfs_inode.c +++ b/fs/freevxfs/vxfs_inode.c @@ -46,15 +46,6 @@ extern struct address_space_operations vxfs_immed_aops; extern struct inode_operations vxfs_immed_symlink_iops; -static struct file_operations vxfs_file_operations = { - .open = generic_file_open, - .llseek = generic_file_llseek, - .read = generic_file_read, - .mmap = generic_file_mmap, - .sendfile = generic_file_sendfile, -}; - - kmem_cache_t *vxfs_inode_cachep; @@ -318,7 +309,7 @@ vxfs_read_inode(struct inode *ip) aops = &vxfs_aops; if (S_ISREG(ip->i_mode)) { - ip->i_fop = &vxfs_file_operations; + ip->i_fop = &generic_ro_fops; ip->i_mapping->a_ops = aops; } else if (S_ISDIR(ip->i_mode)) { ip->i_op = &vxfs_dir_inode_ops; @@ -337,16 +328,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); }