diff options
Diffstat (limited to 'fs/buffer.c')
| -rw-r--r-- | fs/buffer.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index c9c266db0624..e8aa7081d25c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
| @@ -275,6 +275,7 @@ void invalidate_bdev(struct block_device *bdev) | |||
| 275 | return; | 275 | return; |
| 276 | 276 | ||
| 277 | invalidate_bh_lrus(); | 277 | invalidate_bh_lrus(); |
| 278 | lru_add_drain_all(); /* make sure all lru add caches are flushed */ | ||
| 278 | invalidate_mapping_pages(mapping, 0, -1); | 279 | invalidate_mapping_pages(mapping, 0, -1); |
| 279 | } | 280 | } |
| 280 | EXPORT_SYMBOL(invalidate_bdev); | 281 | EXPORT_SYMBOL(invalidate_bdev); |
| @@ -560,26 +561,17 @@ repeat: | |||
| 560 | return err; | 561 | return err; |
| 561 | } | 562 | } |
| 562 | 563 | ||
| 563 | static void do_thaw_all(struct work_struct *work) | 564 | static void do_thaw_one(struct super_block *sb, void *unused) |
| 564 | { | 565 | { |
| 565 | struct super_block *sb; | ||
| 566 | char b[BDEVNAME_SIZE]; | 566 | char b[BDEVNAME_SIZE]; |
| 567 | while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb)) | ||
| 568 | printk(KERN_WARNING "Emergency Thaw on %s\n", | ||
| 569 | bdevname(sb->s_bdev, b)); | ||
| 570 | } | ||
| 567 | 571 | ||
| 568 | spin_lock(&sb_lock); | 572 | static void do_thaw_all(struct work_struct *work) |
| 569 | restart: | 573 | { |
| 570 | list_for_each_entry(sb, &super_blocks, s_list) { | 574 | iterate_supers(do_thaw_one, NULL); |
| 571 | sb->s_count++; | ||
| 572 | spin_unlock(&sb_lock); | ||
| 573 | down_read(&sb->s_umount); | ||
| 574 | while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb)) | ||
| 575 | printk(KERN_WARNING "Emergency Thaw on %s\n", | ||
| 576 | bdevname(sb->s_bdev, b)); | ||
| 577 | up_read(&sb->s_umount); | ||
| 578 | spin_lock(&sb_lock); | ||
| 579 | if (__put_super_and_need_restart(sb)) | ||
| 580 | goto restart; | ||
| 581 | } | ||
| 582 | spin_unlock(&sb_lock); | ||
| 583 | kfree(work); | 575 | kfree(work); |
| 584 | printk(KERN_WARNING "Emergency Thaw complete\n"); | 576 | printk(KERN_WARNING "Emergency Thaw complete\n"); |
| 585 | } | 577 | } |
