aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ncpfs/inode.c')
-rw-r--r--fs/ncpfs/inode.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 8fb93b604e73..9531c052d7a4 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -29,6 +29,7 @@
29#include <linux/vfs.h> 29#include <linux/vfs.h>
30#include <linux/mount.h> 30#include <linux/mount.h>
31#include <linux/seq_file.h> 31#include <linux/seq_file.h>
32#include <linux/namei.h>
32 33
33#include <linux/ncp_fs.h> 34#include <linux/ncp_fs.h>
34 35
@@ -58,11 +59,18 @@ static struct inode *ncp_alloc_inode(struct super_block *sb)
58 return &ei->vfs_inode; 59 return &ei->vfs_inode;
59} 60}
60 61
61static void ncp_destroy_inode(struct inode *inode) 62static void ncp_i_callback(struct rcu_head *head)
62{ 63{
64 struct inode *inode = container_of(head, struct inode, i_rcu);
65 INIT_LIST_HEAD(&inode->i_dentry);
63 kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode)); 66 kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode));
64} 67}
65 68
69static void ncp_destroy_inode(struct inode *inode)
70{
71 call_rcu(&inode->i_rcu, ncp_i_callback);
72}
73
66static void init_once(void *foo) 74static void init_once(void *foo)
67{ 75{
68 struct ncp_inode_info *ei = (struct ncp_inode_info *) foo; 76 struct ncp_inode_info *ei = (struct ncp_inode_info *) foo;
@@ -710,7 +718,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
710 sb->s_root = d_alloc_root(root_inode); 718 sb->s_root = d_alloc_root(root_inode);
711 if (!sb->s_root) 719 if (!sb->s_root)
712 goto out_no_root; 720 goto out_no_root;
713 sb->s_root->d_op = &ncp_root_dentry_operations; 721 d_set_d_op(sb->s_root, &ncp_root_dentry_operations);
714 return 0; 722 return 0;
715 723
716out_no_root: 724out_no_root: