aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/inode.c10
-rw-r--r--include/linux/fs.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c
index af2c05235cc8..ae7b67e48661 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -229,7 +229,7 @@ static struct inode *alloc_inode(struct super_block *sb)
229 return inode; 229 return inode;
230} 230}
231 231
232void destroy_inode(struct inode *inode) 232void __destroy_inode(struct inode *inode)
233{ 233{
234 BUG_ON(inode_has_buffers(inode)); 234 BUG_ON(inode_has_buffers(inode));
235 ima_inode_free(inode); 235 ima_inode_free(inode);
@@ -241,13 +241,17 @@ void destroy_inode(struct inode *inode)
241 if (inode->i_default_acl && inode->i_default_acl != ACL_NOT_CACHED) 241 if (inode->i_default_acl && inode->i_default_acl != ACL_NOT_CACHED)
242 posix_acl_release(inode->i_default_acl); 242 posix_acl_release(inode->i_default_acl);
243#endif 243#endif
244}
245EXPORT_SYMBOL(__destroy_inode);
246
247void destroy_inode(struct inode *inode)
248{
249 __destroy_inode(inode);
244 if (inode->i_sb->s_op->destroy_inode) 250 if (inode->i_sb->s_op->destroy_inode)
245 inode->i_sb->s_op->destroy_inode(inode); 251 inode->i_sb->s_op->destroy_inode(inode);
246 else 252 else
247 kmem_cache_free(inode_cachep, (inode)); 253 kmem_cache_free(inode_cachep, (inode));
248} 254}
249EXPORT_SYMBOL(destroy_inode);
250
251 255
252/* 256/*
253 * These are initializations that only need to be done 257 * These are initializations that only need to be done
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0c3b5e58a986..67888a9e0655 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2164,6 +2164,7 @@ extern void __iget(struct inode * inode);
2164extern void iget_failed(struct inode *); 2164extern void iget_failed(struct inode *);
2165extern void clear_inode(struct inode *); 2165extern void clear_inode(struct inode *);
2166extern void destroy_inode(struct inode *); 2166extern void destroy_inode(struct inode *);
2167extern void __destroy_inode(struct inode *);
2167extern struct inode *new_inode(struct super_block *); 2168extern struct inode *new_inode(struct super_block *);
2168extern int should_remove_suid(struct dentry *); 2169extern int should_remove_suid(struct dentry *);
2169extern int file_remove_suid(struct file *); 2170extern int file_remove_suid(struct file *);