aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-12-12 15:51:45 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:52:40 -0500
commit6b520e0565422966cdf1c3759bd73df77b0f248c (patch)
treef63a26afa7342eb59b125271b16e30a219b59094
parent2a79f17e4a641a2f463cb512cb0ec349844a147b (diff)
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>
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c1
-rw-r--r--drivers/staging/pohmelfs/inode.c1
-rw-r--r--fs/9p/vfs_inode.c1
-rw-r--r--fs/affs/super.c1
-rw-r--r--fs/afs/super.c1
-rw-r--r--fs/befs/linuxvfs.c1
-rw-r--r--fs/bfs/inode.c1
-rw-r--r--fs/block_dev.c1
-rw-r--r--fs/btrfs/inode.c1
-rw-r--r--fs/ceph/inode.c1
-rw-r--r--fs/coda/inode.c1
-rw-r--r--fs/ecryptfs/super.c1
-rw-r--r--fs/efs/super.c1
-rw-r--r--fs/exofs/super.c1
-rw-r--r--fs/ext2/super.c1
-rw-r--r--fs/ext3/super.c1
-rw-r--r--fs/ext4/super.c1
-rw-r--r--fs/fat/inode.c1
-rw-r--r--fs/freevxfs/vxfs_inode.c1
-rw-r--r--fs/fuse/inode.c1
-rw-r--r--fs/gfs2/super.c1
-rw-r--r--fs/hfs/super.c1
-rw-r--r--fs/hfsplus/super.c1
-rw-r--r--fs/hostfs/hostfs_kern.c1
-rw-r--r--fs/hpfs/super.c1
-rw-r--r--fs/hppfs/hppfs.c1
-rw-r--r--fs/hugetlbfs/inode.c1
-rw-r--r--fs/inode.c3
-rw-r--r--fs/isofs/inode.c1
-rw-r--r--fs/jffs2/super.c1
-rw-r--r--fs/jfs/super.c1
-rw-r--r--fs/logfs/inode.c1
-rw-r--r--fs/minix/inode.c1
-rw-r--r--fs/ncpfs/inode.c1
-rw-r--r--fs/nfs/inode.c1
-rw-r--r--fs/nilfs2/super.c2
-rw-r--r--fs/ntfs/inode.c1
-rw-r--r--fs/ocfs2/dlmfs/dlmfs.c1
-rw-r--r--fs/ocfs2/super.c1
-rw-r--r--fs/openpromfs/inode.c1
-rw-r--r--fs/proc/inode.c1
-rw-r--r--fs/qnx4/inode.c1
-rw-r--r--fs/reiserfs/super.c1
-rw-r--r--fs/romfs/super.c1
-rw-r--r--fs/squashfs/super.c1
-rw-r--r--fs/sysv/inode.c1
-rw-r--r--fs/ubifs/super.c1
-rw-r--r--fs/udf/super.c1
-rw-r--r--fs/ufs/super.c1
-rw-r--r--fs/xfs/xfs_iget.c1
-rw-r--r--ipc/mqueue.c1
-rw-r--r--mm/shmem.c1
-rw-r--r--net/sunrpc/rpc_pipe.c1
53 files changed, 1 insertions, 55 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index e481f6b9a789..d85f8cbdc8b3 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -74,7 +74,6 @@ spufs_alloc_inode(struct super_block *sb)
74static void spufs_i_callback(struct rcu_head *head) 74static void spufs_i_callback(struct rcu_head *head)
75{ 75{
76 struct inode *inode = container_of(head, struct inode, i_rcu); 76 struct inode *inode = container_of(head, struct inode, i_rcu);
77 INIT_LIST_HEAD(&inode->i_dentry);
78 kmem_cache_free(spufs_inode_cache, SPUFS_I(inode)); 77 kmem_cache_free(spufs_inode_cache, SPUFS_I(inode));
79} 78}
80 79
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index 7a1955583b7d..6c12516826ad 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -830,7 +830,6 @@ const struct address_space_operations pohmelfs_aops = {
830static void pohmelfs_i_callback(struct rcu_head *head) 830static void pohmelfs_i_callback(struct rcu_head *head)
831{ 831{
832 struct inode *inode = container_of(head, struct inode, i_rcu); 832 struct inode *inode = container_of(head, struct inode, i_rcu);
833 INIT_LIST_HEAD(&inode->i_dentry);
834 kmem_cache_free(pohmelfs_inode_cache, POHMELFS_I(inode)); 833 kmem_cache_free(pohmelfs_inode_cache, POHMELFS_I(inode));
835} 834}
836 835
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 879ed8851737..2310cc9eb402 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -251,7 +251,6 @@ struct inode *v9fs_alloc_inode(struct super_block *sb)
251static void v9fs_i_callback(struct rcu_head *head) 251static void v9fs_i_callback(struct rcu_head *head)
252{ 252{
253 struct inode *inode = container_of(head, struct inode, i_rcu); 253 struct inode *inode = container_of(head, struct inode, i_rcu);
254 INIT_LIST_HEAD(&inode->i_dentry);
255 kmem_cache_free(v9fs_inode_cache, V9FS_I(inode)); 254 kmem_cache_free(v9fs_inode_cache, V9FS_I(inode));
256} 255}
257 256
diff --git a/fs/affs/super.c b/fs/affs/super.c
index b31507d0f9b9..8ba73fed7964 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -98,7 +98,6 @@ static struct inode *affs_alloc_inode(struct super_block *sb)
98static void affs_i_callback(struct rcu_head *head) 98static void affs_i_callback(struct rcu_head *head)
99{ 99{
100 struct inode *inode = container_of(head, struct inode, i_rcu); 100 struct inode *inode = container_of(head, struct inode, i_rcu);
101 INIT_LIST_HEAD(&inode->i_dentry);
102 kmem_cache_free(affs_inode_cachep, AFFS_I(inode)); 101 kmem_cache_free(affs_inode_cachep, AFFS_I(inode));
103} 102}
104 103
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 356dcf0929e8..983ec59fc80d 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -495,7 +495,6 @@ static void afs_i_callback(struct rcu_head *head)
495{ 495{
496 struct inode *inode = container_of(head, struct inode, i_rcu); 496 struct inode *inode = container_of(head, struct inode, i_rcu);
497 struct afs_vnode *vnode = AFS_FS_I(inode); 497 struct afs_vnode *vnode = AFS_FS_I(inode);
498 INIT_LIST_HEAD(&inode->i_dentry);
499 kmem_cache_free(afs_inode_cachep, vnode); 498 kmem_cache_free(afs_inode_cachep, vnode);
500} 499}
501 500
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 8342ca67abcd..6e6d536767fe 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -286,7 +286,6 @@ befs_alloc_inode(struct super_block *sb)
286static void befs_i_callback(struct rcu_head *head) 286static void befs_i_callback(struct rcu_head *head)
287{ 287{
288 struct inode *inode = container_of(head, struct inode, i_rcu); 288 struct inode *inode = container_of(head, struct inode, i_rcu);
289 INIT_LIST_HEAD(&inode->i_dentry);
290 kmem_cache_free(befs_inode_cachep, BEFS_I(inode)); 289 kmem_cache_free(befs_inode_cachep, BEFS_I(inode));
291} 290}
292 291
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 697af5bf70b3..b0391bc402b1 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -251,7 +251,6 @@ static struct inode *bfs_alloc_inode(struct super_block *sb)
251static void bfs_i_callback(struct rcu_head *head) 251static void bfs_i_callback(struct rcu_head *head)
252{ 252{
253 struct inode *inode = container_of(head, struct inode, i_rcu); 253 struct inode *inode = container_of(head, struct inode, i_rcu);
254 INIT_LIST_HEAD(&inode->i_dentry);
255 kmem_cache_free(bfs_inode_cachep, BFS_I(inode)); 254 kmem_cache_free(bfs_inode_cachep, BFS_I(inode));
256} 255}
257 256
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 4b322a58a513..7866cdd9fe70 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -425,7 +425,6 @@ static void bdev_i_callback(struct rcu_head *head)
425 struct inode *inode = container_of(head, struct inode, i_rcu); 425 struct inode *inode = container_of(head, struct inode, i_rcu);
426 struct bdev_inode *bdi = BDEV_I(inode); 426 struct bdev_inode *bdi = BDEV_I(inode);
427 427
428 INIT_LIST_HEAD(&inode->i_dentry);
429 kmem_cache_free(bdev_cachep, bdi); 428 kmem_cache_free(bdev_cachep, bdi);
430} 429}
431 430
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index fd1a06df5bc6..f8ff9738558a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6761,7 +6761,6 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
6761static void btrfs_i_callback(struct rcu_head *head) 6761static void btrfs_i_callback(struct rcu_head *head)
6762{ 6762{
6763 struct inode *inode = container_of(head, struct inode, i_rcu); 6763 struct inode *inode = container_of(head, struct inode, i_rcu);
6764 INIT_LIST_HEAD(&inode->i_dentry);
6765 kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode)); 6764 kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
6766} 6765}
6767 6766
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 87fb132fb330..25283e7a37f8 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -384,7 +384,6 @@ static void ceph_i_callback(struct rcu_head *head)
384 struct inode *inode = container_of(head, struct inode, i_rcu); 384 struct inode *inode = container_of(head, struct inode, i_rcu);
385 struct ceph_inode_info *ci = ceph