diff options
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index bf503be689c3..37a7a1f12329 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -435,13 +435,20 @@ static struct inode *bdev_alloc_inode(struct super_block *sb) | |||
435 | return &ei->vfs_inode; | 435 | return &ei->vfs_inode; |
436 | } | 436 | } |
437 | 437 | ||
438 | static void bdev_destroy_inode(struct inode *inode) | 438 | static void bdev_i_callback(struct rcu_head *head) |
439 | { | 439 | { |
440 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
440 | struct bdev_inode *bdi = BDEV_I(inode); | 441 | struct bdev_inode *bdi = BDEV_I(inode); |
441 | 442 | ||
443 | INIT_LIST_HEAD(&inode->i_dentry); | ||
442 | kmem_cache_free(bdev_cachep, bdi); | 444 | kmem_cache_free(bdev_cachep, bdi); |
443 | } | 445 | } |
444 | 446 | ||
447 | static void bdev_destroy_inode(struct inode *inode) | ||
448 | { | ||
449 | call_rcu(&inode->i_rcu, bdev_i_callback); | ||
450 | } | ||
451 | |||
445 | static void init_once(void *foo) | 452 | static void init_once(void *foo) |
446 | { | 453 | { |
447 | struct bdev_inode *ei = (struct bdev_inode *) foo; | 454 | struct bdev_inode *ei = (struct bdev_inode *) foo; |