Skip to content

Commit b62de32

Browse files
author
Al Viro
committed
hugetlb: make use of ->free_inode()
moving synchronous parts of ->destroy_inode() to ->evict_inode() is not possible here - they are balancing the stuff done in ->alloc_inode(), not the things acquired while using it or sanity checks. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0b269de commit b62de32

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎fs/hugetlbfs/inode.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,17 +1051,15 @@ static struct inode *hugetlbfs_alloc_inode(struct super_block *sb)
10511051
return &p->vfs_inode;
10521052
}
10531053

1054-
static void hugetlbfs_i_callback(struct rcu_head *head)
1054+
static void hugetlbfs_free_inode(struct inode *inode)
10551055
{
1056-
struct inode *inode = container_of(head, struct inode, i_rcu);
10571056
kmem_cache_free(hugetlbfs_inode_cachep, HUGETLBFS_I(inode));
10581057
}
10591058

10601059
static void hugetlbfs_destroy_inode(struct inode *inode)
10611060
{
10621061
hugetlbfs_inc_free_inodes(HUGETLBFS_SB(inode->i_sb));
10631062
mpol_free_shared_policy(&HUGETLBFS_I(inode)->policy);
1064-
call_rcu(&inode->i_rcu, hugetlbfs_i_callback);
10651063
}
10661064

10671065
static const struct address_space_operations hugetlbfs_aops = {
@@ -1108,6 +1106,7 @@ static const struct inode_operations hugetlbfs_inode_operations = {
11081106

11091107
static const struct super_operations hugetlbfs_ops = {
11101108
.alloc_inode = hugetlbfs_alloc_inode,
1109+
.free_inode = hugetlbfs_free_inode,
11111110
.destroy_inode = hugetlbfs_destroy_inode,
11121111
.evict_inode = hugetlbfs_evict_inode,
11131112
.statfs = hugetlbfs_statfs,

0 commit comments

Comments
 (0)