Skip to content

Commit f276ae0

Browse files
author
Al Viro
committed
orangefs: make use of ->free_inode()
Acked-by: Mike Marshall <hubcap@omnibond.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 74b1da5 commit f276ae0

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎fs/orangefs/super.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ static struct inode *orangefs_alloc_inode(struct super_block *sb)
124124
return &orangefs_inode->vfs_inode;
125125
}
126126

127-
static void orangefs_i_callback(struct rcu_head *head)
127+
static void orangefs_free_inode(struct inode *inode)
128128
{
129-
struct inode *inode = container_of(head, struct inode, i_rcu);
130-
struct orangefs_inode_s *orangefs_inode = ORANGEFS_I(inode);
131-
kmem_cache_free(orangefs_inode_cache, orangefs_inode);
129+
kmem_cache_free(orangefs_inode_cache, ORANGEFS_I(inode));
132130
}
133131

134132
static void orangefs_destroy_inode(struct inode *inode)
@@ -138,8 +136,6 @@ static void orangefs_destroy_inode(struct inode *inode)
138136
gossip_debug(GOSSIP_SUPER_DEBUG,
139137
"%s: deallocated %p destroying inode %pU\n",
140138
__func__, orangefs_inode, get_khandle_from_ino(inode));
141-
142-
call_rcu(&inode->i_rcu, orangefs_i_callback);
143139
}
144140

145141
/*
@@ -299,6 +295,7 @@ void fsid_key_table_finalize(void)
299295

300296
static const struct super_operations orangefs_s_ops = {
301297
.alloc_inode = orangefs_alloc_inode,
298+
.free_inode = orangefs_free_inode,
302299
.destroy_inode = orangefs_destroy_inode,
303300
.drop_inode = generic_delete_inode,
304301
.statfs = orangefs_statfs,

0 commit comments

Comments
 (0)