aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-07 14:34:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:48:37 -0400
commitb57922d97fd6f79b6dbe6db0c4fd30d219fa08c1 (patch)
tree1d39e9cd8e1c1f502fb7e985a08286859c69aa36 /fs/block_dev.c
parent45321ac54316eaeeebde0b5f728a1791e500974c (diff)
convert remaining ->clear_inode() to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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,