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;
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;
}
/**
- * 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);
}