aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 63c9d6076205..de7b4d0c7e30 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -426,10 +426,13 @@ static inline void __bd_forget(struct inode *inode)
426 inode->i_mapping = &inode->i_data; 426 inode->i_mapping = &inode->i_data;
427} 427}
428 428
429static void bdev_clear_inode(struct inode *inode) 429static void bdev_evict_inode(struct inode *inode)
430{ 430{
431 struct block_device *bdev = &BDEV_I(inode)->bdev; 431 struct block_device *bdev = &BDEV_I(inode)->bdev;
432 struct list_head *p; 432 struct list_head *p;
433 truncate_inode_pages(&inode->i_data, 0);
434 invalidate_inode_buffers(inode); /* is it needed here? */
435 end_writeback(inode);
433 spin_lock(&bdev_lock); 436 spin_lock(&bdev_lock);
434 while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) { 437 while ( (p = bdev->bd_inodes.next) != &bdev->bd_inodes ) {
435 __bd_forget(list_entry(p, struct inode, i_devices)); 438 __bd_forget(list_entry(p, struct inode, i_devices));
@@ -443,7 +446,7 @@ static const struct super_operations bdev_sops = {
443 .alloc_inode = bdev_alloc_inode, 446 .alloc_inode = bdev_alloc_inode,
444 .destroy_inode = bdev_destroy_inode, 447 .destroy_inode = bdev_destroy_inode,
445 .drop_inode = generic_delete_inode, 448 .drop_inode = generic_delete_inode,
446 .clear_inode = bdev_clear_inode, 449 .evict_inode = bdev_evict_inode,
447}; 450};
448 451
449static int bd_get_sb(struct file_system_type *fs_type, 452static int bd_get_sb(struct file_system_type *fs_type,