Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b520e05 authored by Al Viro's avatar Al Viro
Browse files

vfs: fix the stupidity with i_dentry in inode destructors



Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
the cost of taking it into inode_init_always() will be negligible for pipes
and sockets and negative for everything else.  Not to mention the removal of
boilerplate code from ->destroy_inode() instances...

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2a79f17e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -74,7 +74,6 @@ spufs_alloc_inode(struct super_block *sb)
static void spufs_i_callback(struct rcu_head *head)
{
	struct inode *inode = container_of(head, struct inode, i_rcu);
	INIT_LIST_HEAD(&inode->i_dentry);
	kmem_cache_free(spufs_inode_cache, SPUFS_I(inode));
}

+0 −1
Original line number Diff line number Diff line
@@ -830,7 +830,6 @@ const struct address_space_operations pohmelfs_aops = {
static void pohmelfs_i_callback(struct rcu_head *head)
{
	struct inode *inode = container_of(head, struct inode, i_rcu);
	INIT_LIST_HEAD(&inode->i_dentry);
	kmem_cache_free(pohmelfs_inode_cache, POHMELFS_I(inode));
}

+0 −1
Original line number Diff line number Diff line
@@ -251,7 +251,6 @@ struct inode *v9fs_alloc_inode(struct super_block *sb)
static void v9fs_i_callback(struct rcu_head *head)
{
	struct inode *inode = container_of(head, struct inode, i_rcu);
	INIT_LIST_HEAD(&inode->i_dentry);
	kmem_cache_free(v9fs_inode_cache, V9FS_I(inode));
}

+0 −1
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ static struct inode *affs_alloc_inode(struct super_block *sb)
static void affs_i_callback(struct rcu_head *head)
{
	struct inode *inode = container_of(head, struct inode, i_rcu);
	INIT_LIST_HEAD(&inode->i_dentry);
	kmem_cache_free(affs_inode_cachep, AFFS_I(inode));
}

+0 −1
Original line number Diff line number Diff line
@@ -495,7 +495,6 @@ static void afs_i_callback(struct rcu_head *head)
{
	struct inode *inode = container_of(head, struct inode, i_rcu);
	struct afs_vnode *vnode = AFS_FS_I(inode);
	INIT_LIST_HEAD(&inode->i_dentry);
	kmem_cache_free(afs_inode_cachep, vnode);
}

Loading