diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2011-12-12 15:51:45 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:52:40 -0500 |
| commit | 6b520e0565422966cdf1c3759bd73df77b0f248c (patch) | |
| tree | f63a26afa7342eb59b125271b16e30a219b59094 | |
| parent | 2a79f17e4a641a2f463cb512cb0ec349844a147b (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>
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) | |||
| 74 | static void spufs_i_callback(struct rcu_head *head) | 74 | static 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 = { | |||
| 830 | static void pohmelfs_i_callback(struct rcu_head *head) | 830 | static 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) | |||
| 251 | static void v9fs_i_callback(struct rcu_head *head) | 251 | static 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) | |||
| 98 | static void affs_i_callback(struct rcu_head *head) | 98 | static 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) | |||
| 286 | static void befs_i_callback(struct rcu_head *head) | 286 | static 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) | |||
| 251 | static void bfs_i_callback(struct rcu_head *head) | 251 | static 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) | |||
| 6761 | static void btrfs_i_callback(struct rcu_head *head) | 6761 | static 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 | ||
