Commit f98393a64ca1392130724c3acb4e3f325801d2b6
Committed by
Linus Torvalds
1 parent
0a27a14a62
Exists in
master
and in
4 other branches
mm: remove destroy_dirty_buffers from invalidate_bdev()
Remove the destroy_dirty_buffers argument from invalidate_bdev(), it hasn't been used in 6 years (so akpm says). find * -name \*.[ch] | xargs grep -l invalidate_bdev | while read file; do quilt add $file; sed -ie 's/invalidate_bdev(\([^,]*\),[^)]*)/invalidate_bdev(\1)/g' $file; done Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 13 changed files with 20 additions and 25 deletions Side-by-side Diff
block/ioctl.c
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | } |
81 | 81 | /* all seems OK */ |
82 | 82 | fsync_bdev(bdevp); |
83 | - invalidate_bdev(bdevp, 0); | |
83 | + invalidate_bdev(bdevp); | |
84 | 84 | |
85 | 85 | mutex_lock_nested(&bdev->bd_mutex, 1); |
86 | 86 | delete_partition(disk, part); |
... | ... | @@ -236,7 +236,7 @@ |
236 | 236 | |
237 | 237 | lock_kernel(); |
238 | 238 | fsync_bdev(bdev); |
239 | - invalidate_bdev(bdev, 0); | |
239 | + invalidate_bdev(bdev); | |
240 | 240 | unlock_kernel(); |
241 | 241 | return 0; |
242 | 242 |
drivers/block/amiflop.c
drivers/block/loop.c
... | ... | @@ -833,7 +833,7 @@ |
833 | 833 | lo->lo_backing_file = NULL; |
834 | 834 | lo->lo_flags = 0; |
835 | 835 | set_capacity(disks[lo->lo_number], 0); |
836 | - invalidate_bdev(bdev, 0); | |
836 | + invalidate_bdev(bdev); | |
837 | 837 | bd_set_size(bdev, 0); |
838 | 838 | mapping_set_gfp_mask(mapping, lo->old_gfp_mask); |
839 | 839 | lo->lo_state = Lo_unbound; |
... | ... | @@ -917,7 +917,7 @@ |
917 | 917 | memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE); |
918 | 918 | memset(lo->lo_crypt_name, 0, LO_NAME_SIZE); |
919 | 919 | memset(lo->lo_file_name, 0, LO_NAME_SIZE); |
920 | - invalidate_bdev(bdev, 0); | |
920 | + invalidate_bdev(bdev); | |
921 | 921 | set_capacity(disks[lo->lo_number], 0); |
922 | 922 | bd_set_size(bdev, 0); |
923 | 923 | mapping_set_gfp_mask(filp->f_mapping, gfp); |
drivers/block/rd.c
drivers/cdrom/cdrom.c
drivers/md/md.c
fs/block_dev.c
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | /* Kill _all_ buffers, dirty or not.. */ |
59 | 59 | static void kill_bdev(struct block_device *bdev) |
60 | 60 | { |
61 | - invalidate_bdev(bdev, 1); | |
61 | + invalidate_bdev(bdev); | |
62 | 62 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); |
63 | 63 | } |
64 | 64 | |
... | ... | @@ -1478,7 +1478,7 @@ |
1478 | 1478 | res = invalidate_inodes(sb); |
1479 | 1479 | drop_super(sb); |
1480 | 1480 | } |
1481 | - invalidate_bdev(bdev, 0); | |
1481 | + invalidate_bdev(bdev); | |
1482 | 1482 | return res; |
1483 | 1483 | } |
1484 | 1484 | EXPORT_SYMBOL(__invalidate_device); |
fs/buffer.c
... | ... | @@ -333,7 +333,7 @@ |
333 | 333 | we think the disk contains more recent information than the buffercache. |
334 | 334 | The update == 1 pass marks the buffers we need to update, the update == 2 |
335 | 335 | pass does the actual I/O. */ |
336 | -void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) | |
336 | +void invalidate_bdev(struct block_device *bdev) | |
337 | 337 | { |
338 | 338 | struct address_space *mapping = bdev->bd_inode->i_mapping; |
339 | 339 | |
... | ... | @@ -341,11 +341,6 @@ |
341 | 341 | return; |
342 | 342 | |
343 | 343 | invalidate_bh_lrus(); |
344 | - /* | |
345 | - * FIXME: what about destroy_dirty_buffers? | |
346 | - * We really want to use invalidate_inode_pages2() for | |
347 | - * that, but not until that's cleaned up. | |
348 | - */ | |
349 | 344 | invalidate_mapping_pages(mapping, 0, -1); |
350 | 345 | } |
351 | 346 |
fs/dquot.c
... | ... | @@ -1432,7 +1432,7 @@ |
1432 | 1432 | mutex_unlock(&dqopt->dqonoff_mutex); |
1433 | 1433 | } |
1434 | 1434 | if (sb->s_bdev) |
1435 | - invalidate_bdev(sb->s_bdev, 0); | |
1435 | + invalidate_bdev(sb->s_bdev); | |
1436 | 1436 | return 0; |
1437 | 1437 | } |
1438 | 1438 | |
... | ... | @@ -1468,7 +1468,7 @@ |
1468 | 1468 | * we see all the changes from userspace... */ |
1469 | 1469 | write_inode_now(inode, 1); |
1470 | 1470 | /* And now flush the block cache so that kernel sees the changes */ |
1471 | - invalidate_bdev(sb->s_bdev, 0); | |
1471 | + invalidate_bdev(sb->s_bdev); | |
1472 | 1472 | mutex_lock(&inode->i_mutex); |
1473 | 1473 | mutex_lock(&dqopt->dqonoff_mutex); |
1474 | 1474 | if (sb_has_quota_enabled(sb, type)) { |
fs/ext3/super.c
... | ... | @@ -420,7 +420,7 @@ |
420 | 420 | dump_orphan_list(sb, sbi); |
421 | 421 | J_ASSERT(list_empty(&sbi->s_orphan)); |
422 | 422 | |
423 | - invalidate_bdev(sb->s_bdev, 0); | |
423 | + invalidate_bdev(sb->s_bdev); | |
424 | 424 | if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) { |
425 | 425 | /* |
426 | 426 | * Invalidate the journal device's buffers. We don't want them |
... | ... | @@ -428,7 +428,7 @@ |
428 | 428 | * hotswapped, and it breaks the `ro-after' testing code. |
429 | 429 | */ |
430 | 430 | sync_blockdev(sbi->journal_bdev); |
431 | - invalidate_bdev(sbi->journal_bdev, 0); | |
431 | + invalidate_bdev(sbi->journal_bdev); | |
432 | 432 | ext3_blkdev_remove(sbi); |
433 | 433 | } |
434 | 434 | sb->s_fs_info = NULL; |
fs/ext4/super.c
... | ... | @@ -470,7 +470,7 @@ |
470 | 470 | dump_orphan_list(sb, sbi); |
471 | 471 | J_ASSERT(list_empty(&sbi->s_orphan)); |
472 | 472 | |
473 | - invalidate_bdev(sb->s_bdev, 0); | |
473 | + invalidate_bdev(sb->s_bdev); | |
474 | 474 | if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) { |
475 | 475 | /* |
476 | 476 | * Invalidate the journal device's buffers. We don't want them |
... | ... | @@ -478,7 +478,7 @@ |
478 | 478 | * hotswapped, and it breaks the `ro-after' testing code. |
479 | 479 | */ |
480 | 480 | sync_blockdev(sbi->journal_bdev); |
481 | - invalidate_bdev(sbi->journal_bdev, 0); | |
481 | + invalidate_bdev(sbi->journal_bdev); | |
482 | 482 | ext4_blkdev_remove(sbi); |
483 | 483 | } |
484 | 484 | sb->s_fs_info = NULL; |
fs/partitions/acorn.c
... | ... | @@ -271,7 +271,7 @@ |
271 | 271 | extern void xd_set_geometry(struct block_device *, |
272 | 272 | unsigned char, unsigned char, unsigned int); |
273 | 273 | xd_set_geometry(bdev, dr->secspertrack, heads, 1); |
274 | - invalidate_bdev(bdev, 1); | |
274 | + invalidate_bdev(bdev); | |
275 | 275 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); |
276 | 276 | } |
277 | 277 | #endif |
include/linux/buffer_head.h
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | void unmap_underlying_metadata(struct block_device *bdev, sector_t block); |
166 | 166 | |
167 | 167 | void mark_buffer_async_write(struct buffer_head *bh); |
168 | -void invalidate_bdev(struct block_device *, int); | |
168 | +void invalidate_bdev(struct block_device *); | |
169 | 169 | int sync_blockdev(struct block_device *bdev); |
170 | 170 | void __wait_on_buffer(struct buffer_head *); |
171 | 171 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); |
... | ... | @@ -319,7 +319,7 @@ |
319 | 319 | static inline void invalidate_inode_buffers(struct inode *inode) {} |
320 | 320 | static inline int remove_inode_buffers(struct inode *inode) { return 1; } |
321 | 321 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } |
322 | -static inline void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) {} | |
322 | +static inline void invalidate_bdev(struct block_device *bdev) {} | |
323 | 323 | |
324 | 324 | |
325 | 325 | #endif /* CONFIG_BLOCK */ |