orangefs: make use of ->free_inode()
Acked-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -124,11 +124,9 @@ static struct inode *orangefs_alloc_inode(struct super_block *sb)
|
|||||||
return &orangefs_inode->vfs_inode;
|
return &orangefs_inode->vfs_inode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void orangefs_i_callback(struct rcu_head *head)
|
static void orangefs_free_inode(struct inode *inode)
|
||||||
{
|
{
|
||||||
struct inode *inode = container_of(head, struct inode, i_rcu);
|
kmem_cache_free(orangefs_inode_cache, ORANGEFS_I(inode));
|
||||||
struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
|
|
||||||
kmem_cache_free(orangefs_inode_cache, orangefs_inode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void orangefs_destroy_inode(struct inode *inode)
|
static void orangefs_destroy_inode(struct inode *inode)
|
||||||
@@ -138,8 +136,6 @@ static void orangefs_destroy_inode(struct inode *inode)
|
|||||||
gossip_debug(GOSSIP_SUPER_DEBUG,
|
gossip_debug(GOSSIP_SUPER_DEBUG,
|
||||||
"%s: deallocated %p destroying inode %pU\n",
|
"%s: deallocated %p destroying inode %pU\n",
|
||||||
__func__, orangefs_inode, get_khandle_from_ino(inode));
|
__func__, orangefs_inode, get_khandle_from_ino(inode));
|
||||||
|
|
||||||
call_rcu(&inode->i_rcu, orangefs_i_callback);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -299,6 +295,7 @@ void fsid_key_table_finalize(void)
|
|||||||
|
|
||||||
static const struct super_operations orangefs_s_ops = {
|
static const struct super_operations orangefs_s_ops = {
|
||||||
.alloc_inode = orangefs_alloc_inode,
|
.alloc_inode = orangefs_alloc_inode,
|
||||||
|
.free_inode = orangefs_free_inode,
|
||||||
.destroy_inode = orangefs_destroy_inode,
|
.destroy_inode = orangefs_destroy_inode,
|
||||||
.drop_inode = generic_delete_inode,
|
.drop_inode = generic_delete_inode,
|
||||||
.statfs = orangefs_statfs,
|
.statfs = orangefs_statfs,
|
||||||
|
|||||||
Reference in New Issue
Block a user