ubifs: switch to ->free_inode()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2019-04-15 22:23:44 -04:00
parent 56b5af1931
commit dc43175996

View File

@ -272,19 +272,13 @@ static struct inode *ubifs_alloc_inode(struct super_block *sb)
return &ui->vfs_inode; return &ui->vfs_inode;
}; };
static void ubifs_i_callback(struct rcu_head *head) static void ubifs_free_inode(struct inode *inode)
{ {
struct inode *inode = container_of(head, struct inode, i_rcu);
struct ubifs_inode *ui = ubifs_inode(inode); struct ubifs_inode *ui = ubifs_inode(inode);
kfree(ui->data); kfree(ui->data);
kmem_cache_free(ubifs_inode_slab, ui); kmem_cache_free(ubifs_inode_slab, ui);
} }
static void ubifs_destroy_inode(struct inode *inode)
{
call_rcu(&inode->i_rcu, ubifs_i_callback);
}
/* /*
* Note, Linux write-back code calls this without 'i_mutex'. * Note, Linux write-back code calls this without 'i_mutex'.
*/ */
@ -1977,7 +1971,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
const struct super_operations ubifs_super_operations = { const struct super_operations ubifs_super_operations = {
.alloc_inode = ubifs_alloc_inode, .alloc_inode = ubifs_alloc_inode,
.destroy_inode = ubifs_destroy_inode, .free_inode = ubifs_free_inode,
.put_super = ubifs_put_super, .put_super = ubifs_put_super,
.write_inode = ubifs_write_inode, .write_inode = ubifs_write_inode,
.evict_inode = ubifs_evict_inode, .evict_inode = ubifs_evict_inode,