Skip to content

Commit 6b520e0

Browse files
author
Al Viro
committed
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: Al Viro <viro@zeniv.linux.org.uk>
1 parent 2a79f17 commit 6b520e0

53 files changed

Lines changed: 1 addition & 55 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/powerpc/platforms/cell/spufs/inode.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ spufs_alloc_inode(struct super_block *sb)
7474
static void spufs_i_callback(struct rcu_head *head)
7575
{
7676
struct inode *inode = container_of(head, struct inode, i_rcu);
77-
INIT_LIST_HEAD(&inode->i_dentry);
7877
kmem_cache_free(spufs_inode_cache, SPUFS_I(inode));
7978
}
8079

‎drivers/staging/pohmelfs/inode.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,6 @@ const struct address_space_operations pohmelfs_aops = {
830830
static void pohmelfs_i_callback(struct rcu_head *head)
831831
{
832832
struct inode *inode = container_of(head, struct inode, i_rcu);
833-
INIT_LIST_HEAD(&inode->i_dentry);
834833
kmem_cache_free(pohmelfs_inode_cache, POHMELFS_I(inode));
835834
}
836835

‎fs/9p/vfs_inode.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ struct inode *v9fs_alloc_inode(struct super_block *sb)
251251
static void v9fs_i_callback(struct rcu_head *head)
252252
{
253253
struct inode *inode = container_of(head, struct inode, i_rcu);
254-
INIT_LIST_HEAD(&inode->i_dentry);
255254
kmem_cache_free(v9fs_inode_cache, V9FS_I(inode));
256255
}
257256

‎fs/affs/super.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static struct inode *affs_alloc_inode(struct super_block *sb)
9898
static void affs_i_callback(struct rcu_head *head)
9999
{
100100
struct inode *inode = container_of(head, struct inode, i_rcu);
101-
INIT_LIST_HEAD(&inode->i_dentry);
102101
kmem_cache_free(affs_inode_cachep, AFFS_I(inode));
103102
}
104103

‎fs/afs/super.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,6 @@ static void afs_i_callback(struct rcu_head *head)
495495
{
496496
struct inode *inode = container_of(head, struct inode, i_rcu);
497497
struct afs_vnode *vnode = AFS_FS_I(inode);
498-
INIT_LIST_HEAD(&inode->i_dentry);
499498
kmem_cache_free(afs_inode_cachep, vnode);
500499
}
501500

‎fs/befs/linuxvfs.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ befs_alloc_inode(struct super_block *sb)
286286
static void befs_i_callback(struct rcu_head *head)
287287
{
288288
struct inode *inode = container_of(head, struct inode, i_rcu);
289-
INIT_LIST_HEAD(&inode->i_dentry);
290289
kmem_cache_free(befs_inode_cachep, BEFS_I(inode));
291290
}
292291

‎fs/bfs/inode.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ static struct inode *bfs_alloc_inode(struct super_block *sb)
251251
static void bfs_i_callback(struct rcu_head *head)
252252
{
253253
struct inode *inode = container_of(head, struct inode, i_rcu);
254-
INIT_LIST_HEAD(&inode->i_dentry);
255254
kmem_cache_free(bfs_inode_cachep, BFS_I(inode));
256255
}
257256

‎fs/block_dev.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ static void bdev_i_callback(struct rcu_head *head)
425425
struct inode *inode = container_of(head, struct inode, i_rcu);
426426
struct bdev_inode *bdi = BDEV_I(inode);
427427

428-
INIT_LIST_HEAD(&inode->i_dentry);
429428
kmem_cache_free(bdev_cachep, bdi);
430429
}
431430

‎fs/btrfs/inode.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6761,7 +6761,6 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
67616761
static void btrfs_i_callback(struct rcu_head *head)
67626762
{
67636763
struct inode *inode = container_of(head, struct inode, i_rcu);
6764-
INIT_LIST_HEAD(&inode->i_dentry);
67656764
kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
67666765
}
67676766

‎fs/ceph/inode.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ static void ceph_i_callback(struct rcu_head *head)
384384
struct inode *inode = container_of(head, struct inode, i_rcu);
385385
struct ceph_inode_info *ci = ceph_inode(inode);
386386

387-
INIT_LIST_HEAD(&inode->i_dentry);
388387
kmem_cache_free(ceph_inode_cachep, ci);
389388
}
390389

0 commit comments

Comments
 (0)