diff options
Diffstat (limited to 'fs/ecryptfs/super.c')
-rw-r--r-- | fs/ecryptfs/super.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index 2720178b7718..3042fe123a34 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
@@ -62,6 +62,16 @@ out: | |||
62 | return inode; | 62 | return inode; |
63 | } | 63 | } |
64 | 64 | ||
65 | static void ecryptfs_i_callback(struct rcu_head *head) | ||
66 | { | ||
67 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
68 | struct ecryptfs_inode_info *inode_info; | ||
69 | inode_info = ecryptfs_inode_to_private(inode); | ||
70 | |||
71 | INIT_LIST_HEAD(&inode->i_dentry); | ||
72 | kmem_cache_free(ecryptfs_inode_info_cache, inode_info); | ||
73 | } | ||
74 | |||
65 | /** | 75 | /** |
66 | * ecryptfs_destroy_inode | 76 | * ecryptfs_destroy_inode |
67 | * @inode: The ecryptfs inode | 77 | * @inode: The ecryptfs inode |
@@ -88,7 +98,7 @@ static void ecryptfs_destroy_inode(struct inode *inode) | |||
88 | } | 98 | } |
89 | } | 99 | } |
90 | ecryptfs_destroy_crypt_stat(&inode_info->crypt_stat); | 100 | ecryptfs_destroy_crypt_stat(&inode_info->crypt_stat); |
91 | kmem_cache_free(ecryptfs_inode_info_cache, inode_info); | 101 | call_rcu(&inode->i_rcu, ecryptfs_i_callback); |
92 | } | 102 | } |
93 | 103 | ||
94 | /** | 104 | /** |