diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-05-06 17:49:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:12:55 -0400 |
commit | f98393a64ca1392130724c3acb4e3f325801d2b6 (patch) | |
tree | b02838bdf84156ac923bb37b6cf5f5ed6aaa3d48 | |
parent | 0a27a14a62921b438bb6f33772690d345a089be6 (diff) |
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>
-rw-r--r-- | block/ioctl.c | 4 | ||||
-rw-r--r-- | drivers/block/amiflop.c | 2 | ||||
-rw-r--r-- | drivers/block/loop.c | 4 | ||||
-rw-r--r-- | drivers/block/rd.c | 2 | ||||
-rw-r--r-- | drivers/cdrom/cdrom.c | 2 | ||||
-rw-r--r-- | drivers/md/md.c | 2 | ||||
-rw-r--r-- | fs/block_dev.c | 4 | ||||
-rw-r--r-- | fs/buffer.c | 7 | ||||
-rw-r--r-- | fs/dquot.c | 4 | ||||
-rw-r--r-- | fs/ext3/super.c | 4 | ||||
-rw-r--r-- | fs/ext4/super.c | 4 | ||||
-rw-r--r-- | fs/partitions/acorn.c | 2 | ||||
-rw-r--r-- | include/linux/buffer_head.h | 4 |
13 files changed, 20 insertions, 25 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index e06dbe9bc858..f7e3e8abf887 100644 --- a/block/ioctl.c +++ b/block/ioctl.c | |||
@@ -80,7 +80,7 @@ static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user | |||
80 | } | 80 | } |
81 | /* all seems OK */ | 81 | /* all seems OK */ |
82 | fsync_bdev(bdevp); | 82 | fsync_bdev(bdevp); |
83 | invalidate_bdev(bdevp, 0); | 83 | invalidate_bdev(bdevp); |
84 | 84 | ||
85 | mutex_lock_nested(&bdev->bd_mutex, 1); | 85 | mutex_lock_nested(&bdev->bd_mutex, 1); |
86 | delete_partition(disk, part); | 86 | delete_partition(disk, part); |
@@ -236,7 +236,7 @@ int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd, | |||
236 | 236 | ||
237 | lock_kernel(); | 237 | lock_kernel(); |
238 | fsync_bdev(bdev); | 238 | fsync_bdev(bdev); |
239 | invalidate_bdev(bdev, 0); | 239 | invalidate_bdev(bdev); |
240 | unlock_kernel(); | 240 | unlock_kernel(); |
241 | return 0; | 241 | return 0; |
242 | 242 | ||
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 5d6562171533..27a139025ced 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
@@ -1480,7 +1480,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, | |||
1480 | break; | 1480 | break; |
1481 | case FDFMTEND: | 1481 | case FDFMTEND: |
1482 | floppy_off(drive); | 1482 | floppy_off(drive); |
1483 | invalidate_bdev(inode->i_bdev, 0); | 1483 | invalidate_bdev(inode->i_bdev); |
1484 | break; | 1484 | break; |
1485 | case FDGETPRM: | 1485 | case FDGETPRM: |
1486 | memset((void *)&getprm, 0, sizeof (getprm)); | 1486 | memset((void *)&getprm, 0, sizeof (getprm)); |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 6b5b64207407..0d4ccd4a0957 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -833,7 +833,7 @@ out_clr: | |||
833 | lo->lo_backing_file = NULL; | 833 | lo->lo_backing_file = NULL; |
834 | lo->lo_flags = 0; | 834 | lo->lo_flags = 0; |
835 | set_capacity(disks[lo->lo_number], 0); | 835 | set_capacity(disks[lo->lo_number], 0); |
836 | invalidate_bdev(bdev, 0); | 836 | invalidate_bdev(bdev); |
837 | bd_set_size(bdev, 0); | 837 | bd_set_size(bdev, 0); |
838 | mapping_set_gfp_mask(mapping, lo->old_gfp_mask); | 838 | mapping_set_gfp_mask(mapping, lo->old_gfp_mask); |
839 | lo->lo_state = Lo_unbound; | 839 | lo->lo_state = Lo_unbound; |
@@ -917,7 +917,7 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev) | |||
917 | memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE); | 917 | memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE); |
918 | memset(lo->lo_crypt_name, 0, LO_NAME_SIZE); | 918 | memset(lo->lo_crypt_name, 0, LO_NAME_SIZE); |
919 | memset(lo->lo_file_name, 0, LO_NAME_SIZE); | 919 | memset(lo->lo_file_name, 0, LO_NAME_SIZE); |
920 | invalidate_bdev(bdev, 0); | 920 | invalidate_bdev(bdev); |
921 | set_capacity(disks[lo->lo_number], 0); | 921 | set_capacity(disks[lo->lo_number], 0); |
922 | bd_set_size(bdev, 0); | 922 | bd_set_size(bdev, 0); |
923 | mapping_set_gfp_mask(filp->f_mapping, gfp); | 923 | mapping_set_gfp_mask(filp->f_mapping, gfp); |
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 485aa87e9bcd..43d4ebcb3b44 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c | |||
@@ -403,7 +403,7 @@ static void __exit rd_cleanup(void) | |||
403 | struct block_device *bdev = rd_bdev[i]; | 403 | struct block_device *bdev = rd_bdev[i]; |
404 | rd_bdev[i] = NULL; | 404 | rd_bdev[i] = NULL; |
405 | if (bdev) { | 405 | if (bdev) { |
406 | invalidate_bdev(bdev, 1); | 406 | invalidate_bdev(bdev); |
407 | blkdev_put(bdev); | 407 | blkdev_put(bdev); |
408 | } | 408 | } |
409 | del_gendisk(rd_disks[i]); | 409 | del_gendisk(rd_disks[i]); |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index b36f44d4d1bf..3625a05bc3d3 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -2384,7 +2384,7 @@ static int cdrom_ioctl_reset(struct cdrom_device_info *cdi, | |||
2384 | return -EACCES; | 2384 | return -EACCES; |
2385 | if (!CDROM_CAN(CDC_RESET)) | 2385 | if (!CDROM_CAN(CDC_RESET)) |
2386 | return -ENOSYS; | 2386 | return -ENOSYS; |
2387 | invalidate_bdev(bdev, 0); | 2387 | invalidate_bdev(bdev); |
2388 | return cdi->ops->reset(cdi); | 2388 | return cdi->ops->reset(cdi); |
2389 | } | 2389 | } |
2390 | 2390 | ||
diff --git a/drivers/md/md.c b/drivers/md/md.c index 509171ca7fa8..2b4315d7e5d6 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3080,7 +3080,7 @@ static int do_md_run(mddev_t * mddev) | |||
3080 | if (test_bit(Faulty, &rdev->flags)) | 3080 | if (test_bit(Faulty, &rdev->flags)) |
3081 | continue; | 3081 | continue; |
3082 | sync_blockdev(rdev->bdev); | 3082 | sync_blockdev(rdev->bdev); |
3083 | invalidate_bdev(rdev->bdev, 0); | 3083 | invalidate_bdev(rdev->bdev); |
3084 | } | 3084 | } |
3085 | 3085 | ||
3086 | md_probe(mddev->unit, NULL, NULL); | 3086 | md_probe(mddev->unit, NULL, NULL); |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 575076c018f4..21e59acbcfdf 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -58,7 +58,7 @@ static sector_t max_block(struct block_device *bdev) | |||
58 | /* Kill _all_ buffers, dirty or not.. */ | 58 | /* Kill _all_ buffers, dirty or not.. */ |
59 | static void kill_bdev(struct block_device *bdev) | 59 | static void kill_bdev(struct block_device *bdev) |
60 | { | 60 | { |
61 | invalidate_bdev(bdev, 1); | 61 | invalidate_bdev(bdev); |
62 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); | 62 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); |
63 | } | 63 | } |
64 | 64 | ||
@@ -1478,7 +1478,7 @@ int __invalidate_device(struct block_device *bdev) | |||
1478 | res = invalidate_inodes(sb); | 1478 | res = invalidate_inodes(sb); |
1479 | drop_super(sb); | 1479 | drop_super(sb); |
1480 | } | 1480 | } |
1481 | invalidate_bdev(bdev, 0); | 1481 | invalidate_bdev(bdev); |
1482 | return res; | 1482 | return res; |
1483 | } | 1483 | } |
1484 | EXPORT_SYMBOL(__invalidate_device); | 1484 | EXPORT_SYMBOL(__invalidate_device); |
diff --git a/fs/buffer.c b/fs/buffer.c index dcc5faa573ba..630df3e6fe0c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -333,7 +333,7 @@ out: | |||
333 | we think the disk contains more recent information than the buffercache. | 333 | we think the disk contains more recent information than the buffercache. |
334 | The update == 1 pass marks the buffers we need to update, the update == 2 | 334 | The update == 1 pass marks the buffers we need to update, the update == 2 |
335 | pass does the actual I/O. */ | 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 | struct address_space *mapping = bdev->bd_inode->i_mapping; | 338 | struct address_space *mapping = bdev->bd_inode->i_mapping; |
339 | 339 | ||
@@ -341,11 +341,6 @@ void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) | |||
341 | return; | 341 | return; |
342 | 342 | ||
343 | invalidate_bh_lrus(); | 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 | invalidate_mapping_pages(mapping, 0, -1); | 344 | invalidate_mapping_pages(mapping, 0, -1); |
350 | } | 345 | } |
351 | 346 | ||
diff --git a/fs/dquot.c b/fs/dquot.c index b16f991662c1..0a5febc159f2 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -1432,7 +1432,7 @@ int vfs_quota_off(struct super_block *sb, int type) | |||
1432 | mutex_unlock(&dqopt->dqonoff_mutex); | 1432 | mutex_unlock(&dqopt->dqonoff_mutex); |
1433 | } | 1433 | } |
1434 | if (sb->s_bdev) | 1434 | if (sb->s_bdev) |
1435 | invalidate_bdev(sb->s_bdev, 0); | 1435 | invalidate_bdev(sb->s_bdev); |
1436 | return 0; | 1436 | return 0; |
1437 | } | 1437 | } |
1438 | 1438 | ||
@@ -1468,7 +1468,7 @@ static int vfs_quota_on_inode(struct inode *inode, int type, int format_id) | |||
1468 | * we see all the changes from userspace... */ | 1468 | * we see all the changes from userspace... */ |
1469 | write_inode_now(inode, 1); | 1469 | write_inode_now(inode, 1); |
1470 | /* And now flush the block cache so that kernel sees the changes */ | 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 | mutex_lock(&inode->i_mutex); | 1472 | mutex_lock(&inode->i_mutex); |
1473 | mutex_lock(&dqopt->dqonoff_mutex); | 1473 | mutex_lock(&dqopt->dqonoff_mutex); |
1474 | if (sb_has_quota_enabled(sb, type)) { | 1474 | if (sb_has_quota_enabled(sb, type)) { |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 4a4fcd6868c7..4266b708ca01 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -420,7 +420,7 @@ static void ext3_put_super (struct super_block * sb) | |||
420 | dump_orphan_list(sb, sbi); | 420 | dump_orphan_list(sb, sbi); |
421 | J_ASSERT(list_empty(&sbi->s_orphan)); | 421 | J_ASSERT(list_empty(&sbi->s_orphan)); |
422 | 422 | ||
423 | invalidate_bdev(sb->s_bdev, 0); | 423 | invalidate_bdev(sb->s_bdev); |
424 | if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) { | 424 | if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) { |
425 | /* | 425 | /* |
426 | * Invalidate the journal device's buffers. We don't want them | 426 | * Invalidate the journal device's buffers. We don't want them |
@@ -428,7 +428,7 @@ static void ext3_put_super (struct super_block * sb) | |||
428 | * hotswapped, and it breaks the `ro-after' testing code. | 428 | * hotswapped, and it breaks the `ro-after' testing code. |
429 | */ | 429 | */ |
430 | sync_blockdev(sbi->journal_bdev); | 430 | sync_blockdev(sbi->journal_bdev); |
431 | invalidate_bdev(sbi->journal_bdev, 0); | 431 | invalidate_bdev(sbi->journal_bdev); |
432 | ext3_blkdev_remove(sbi); | 432 | ext3_blkdev_remove(sbi); |
433 | } | 433 | } |
434 | sb->s_fs_info = NULL; | 434 | sb->s_fs_info = NULL; |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 61c4718e4a53..25e8d0096176 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -470,7 +470,7 @@ static void ext4_put_super (struct super_block * sb) | |||
470 | dump_orphan_list(sb, sbi); | 470 | dump_orphan_list(sb, sbi); |
471 | J_ASSERT(list_empty(&sbi->s_orphan)); | 471 | J_ASSERT(list_empty(&sbi->s_orphan)); |
472 | 472 | ||
473 | invalidate_bdev(sb->s_bdev, 0); | 473 | invalidate_bdev(sb->s_bdev); |
474 | if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) { | 474 | if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) { |
475 | /* | 475 | /* |
476 | * Invalidate the journal device's buffers. We don't want them | 476 | * Invalidate the journal device's buffers. We don't want them |
@@ -478,7 +478,7 @@ static void ext4_put_super (struct super_block * sb) | |||
478 | * hotswapped, and it breaks the `ro-after' testing code. | 478 | * hotswapped, and it breaks the `ro-after' testing code. |
479 | */ | 479 | */ |
480 | sync_blockdev(sbi->journal_bdev); | 480 | sync_blockdev(sbi->journal_bdev); |
481 | invalidate_bdev(sbi->journal_bdev, 0); | 481 | invalidate_bdev(sbi->journal_bdev); |
482 | ext4_blkdev_remove(sbi); | 482 | ext4_blkdev_remove(sbi); |
483 | } | 483 | } |
484 | sb->s_fs_info = NULL; | 484 | sb->s_fs_info = NULL; |
diff --git a/fs/partitions/acorn.c b/fs/partitions/acorn.c index 1bc9f372c7d4..9a6826c63818 100644 --- a/fs/partitions/acorn.c +++ b/fs/partitions/acorn.c | |||
@@ -271,7 +271,7 @@ adfspart_check_ADFS(struct parsed_partitions *state, struct block_device *bdev) | |||
271 | extern void xd_set_geometry(struct block_device *, | 271 | extern void xd_set_geometry(struct block_device *, |
272 | unsigned char, unsigned char, unsigned int); | 272 | unsigned char, unsigned char, unsigned int); |
273 | xd_set_geometry(bdev, dr->secspertrack, heads, 1); | 273 | xd_set_geometry(bdev, dr->secspertrack, heads, 1); |
274 | invalidate_bdev(bdev, 1); | 274 | invalidate_bdev(bdev); |
275 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); | 275 | truncate_inode_pages(bdev->bd_inode->i_mapping, 0); |
276 | } | 276 | } |
277 | #endif | 277 | #endif |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index dd27b1c7227f..632c50b21386 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -165,7 +165,7 @@ int sync_mapping_buffers(struct address_space *mapping); | |||
165 | void unmap_underlying_metadata(struct block_device *bdev, sector_t block); | 165 | void unmap_underlying_metadata(struct block_device *bdev, sector_t block); |
166 | 166 | ||
167 | void mark_buffer_async_write(struct buffer_head *bh); | 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 | int sync_blockdev(struct block_device *bdev); | 169 | int sync_blockdev(struct block_device *bdev); |
170 | void __wait_on_buffer(struct buffer_head *); | 170 | void __wait_on_buffer(struct buffer_head *); |
171 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); | 171 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); |
@@ -319,7 +319,7 @@ static inline int inode_has_buffers(struct inode *inode) { return 0; } | |||
319 | static inline void invalidate_inode_buffers(struct inode *inode) {} | 319 | static inline void invalidate_inode_buffers(struct inode *inode) {} |
320 | static inline int remove_inode_buffers(struct inode *inode) { return 1; } | 320 | static inline int remove_inode_buffers(struct inode *inode) { return 1; } |
321 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } | 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 | #endif /* CONFIG_BLOCK */ | 325 | #endif /* CONFIG_BLOCK */ |