fs: icache RCU free inodes
[deliverable/linux.git] / fs / hppfs / hppfs.c
index 7b027720d8209b1c041de80e01e4be5aa7cd0ec2..87ed48e0343d701fe621fa1751390bfdfbec06f7 100644 (file)
@@ -598,6 +598,7 @@ static const struct file_operations hppfs_dir_fops = {
        .readdir        = hppfs_readdir,
        .open           = hppfs_dir_open,
        .fsync          = hppfs_fsync,
+       .llseek         = default_llseek,
 };
 
 static int hppfs_statfs(struct dentry *dentry, struct kstatfs *sf)
@@ -631,11 +632,18 @@ void hppfs_evict_inode(struct inode *ino)
        mntput(ino->i_sb->s_fs_info);
 }
 
-static void hppfs_destroy_inode(struct inode *inode)
+static void hppfs_i_callback(struct rcu_head *head)
 {
+       struct inode *inode = container_of(head, struct inode, i_rcu);
+       INIT_LIST_HEAD(&inode->i_dentry);
        kfree(HPPFS_I(inode));
 }
 
+static void hppfs_destroy_inode(struct inode *inode)
+{
+       call_rcu(&inode->i_rcu, hppfs_i_callback);
+}
+
 static const struct super_operations hppfs_sbops = {
        .alloc_inode    = hppfs_alloc_inode,
        .destroy_inode  = hppfs_destroy_inode,
@@ -747,17 +755,17 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent)
        return(err);
 }
 
-static int hppfs_read_super(struct file_system_type *type,
+static struct dentry *hppfs_read_super(struct file_system_type *type,
                            int flags, const char *dev_name,
-                           void *data, struct vfsmount *mnt)
+                           void *data)
 {
-       return get_sb_nodev(type, flags, data, hppfs_fill_super, mnt);
+       return mount_nodev(type, flags, data, hppfs_fill_super);
 }
 
 static struct file_system_type hppfs_type = {
        .owner          = THIS_MODULE,
        .name           = "hppfs",
-       .get_sb         = hppfs_read_super,
+       .mount          = hppfs_read_super,
        .kill_sb        = kill_anon_super,
        .fs_flags       = 0,
 };
This page took 0.025321 seconds and 5 git commands to generate.