diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-16 05:19:05 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-02 04:43:27 +0200 |
commit | 74b1da5645cc4610d7eb5eb26a6609ed0d2e0fb2 (patch) | |
tree | 65c8cf9df7d6a50f578020423891cbe1f3156494 /mm/shmem.c | |
parent | hugetlb: make use of ->free_inode() (diff) | |
download | linux-74b1da5645cc4610d7eb5eb26a6609ed0d2e0fb2.tar.xz linux-74b1da5645cc4610d7eb5eb26a6609ed0d2e0fb2.zip |
shmem: make use of ->free_inode()
same situation as for hugetlbfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index b3db3779a30a..dbb7a6dadba7 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3635,9 +3635,8 @@ static struct inode *shmem_alloc_inode(struct super_block *sb) return &info->vfs_inode; } -static void shmem_destroy_callback(struct rcu_head *head) +static void shmem_free_in_core_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); if (S_ISLNK(inode->i_mode)) kfree(inode->i_link); kmem_cache_free(shmem_inode_cachep, SHMEM_I(inode)); @@ -3647,7 +3646,6 @@ static void shmem_destroy_inode(struct inode *inode) { if (S_ISREG(inode->i_mode)) mpol_free_shared_policy(&SHMEM_I(inode)->policy); - call_rcu(&inode->i_rcu, shmem_destroy_callback); } static void shmem_init_inode(void *foo) @@ -3738,6 +3736,7 @@ static const struct inode_operations shmem_special_inode_operations = { static const struct super_operations shmem_ops = { .alloc_inode = shmem_alloc_inode, + .free_inode = shmem_free_in_core_inode, .destroy_inode = shmem_destroy_inode, #ifdef CONFIG_TMPFS .statfs = shmem_statfs, |