diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-15 22:48:59 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-01 22:43:26 -0400 |
commit | b3b4a6e356dbded14a0513fa0da4fe3ac1c5a33a (patch) | |
tree | 36dc357c6988601005cc2a6e9ce4ea497575c9f8 /fs/jfs/super.c | |
parent | 9baf28bbfea165a62211dd90986d993d77631372 (diff) | |
download | linux-b3b4a6e356dbded14a0513fa0da4fe3ac1c5a33a.tar.bz2 |
jfs: switch to ->free_inode()
synchronous part can be moved to ->evict_inode(), the rest -
->free_inode() fodder
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r-- | fs/jfs/super.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 65d8fc87ab11..9454831bbd71 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -124,27 +124,9 @@ static struct inode *jfs_alloc_inode(struct super_block *sb) return &jfs_inode->vfs_inode; } -static void jfs_i_callback(struct rcu_head *head) +static void jfs_free_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); - struct jfs_inode_info *ji = JFS_IP(inode); - kmem_cache_free(jfs_inode_cachep, ji); -} - -static void jfs_destroy_inode(struct inode *inode) -{ - struct jfs_inode_info *ji = JFS_IP(inode); - - BUG_ON(!list_empty(&ji->anon_inode_list)); - - spin_lock_irq(&ji->ag_lock); - if (ji->active_ag != -1) { - struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; - atomic_dec(&bmap->db_active[ji->active_ag]); - ji->active_ag = -1; - } - spin_unlock_irq(&ji->ag_lock); - call_rcu(&inode->i_rcu, jfs_i_callback); + kmem_cache_free(jfs_inode_cachep, JFS_IP(inode)); } static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf) @@ -912,7 +894,7 @@ out: static const struct super_operations jfs_super_operations = { .alloc_inode = jfs_alloc_inode, - .destroy_inode = jfs_destroy_inode, + .free_inode = jfs_free_inode, .dirty_inode = jfs_dirty_inode, .write_inode = jfs_write_inode, .evict_inode = jfs_evict_inode, |