aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-04-08 07:44:08 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-15 02:28:12 -0400
commit053c525fcf976810f023d96472f414c0d5e6339b (patch)
tree2e1954da38bd4c59edb9ff3daf0111b02c181b0a
parent329007ce25d56fc7113df7b4828d607806d8bc21 (diff)
buffer: switch do_emergency_thaw() away from pdflush_operation()
This is (again) a preparatory patch similar to commit a2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4. It open codes a simple async way of executing do_thaw_all() out of context, so we can get rid of pdflush. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--fs/buffer.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 13edf7ad3ff1..ff8bb1f2333a 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -547,7 +547,7 @@ repeat:
547 return err; 547 return err;
548} 548}
549 549
550void do_thaw_all(unsigned long unused) 550void do_thaw_all(struct work_struct *work)
551{ 551{
552 struct super_block *sb; 552 struct super_block *sb;
553 char b[BDEVNAME_SIZE]; 553 char b[BDEVNAME_SIZE];
@@ -567,6 +567,7 @@ restart:
567 goto restart; 567 goto restart;
568 } 568 }
569 spin_unlock(&sb_lock); 569 spin_unlock(&sb_lock);
570 kfree(work);
570 printk(KERN_WARNING "Emergency Thaw complete\n"); 571 printk(KERN_WARNING "Emergency Thaw complete\n");
571} 572}
572 573
@@ -577,7 +578,13 @@ restart:
577 */ 578 */
578void emergency_thaw_all(void) 579void emergency_thaw_all(void)
579{ 580{
580 pdflush_operation(do_thaw_all, 0); 581 struct work_struct *work;
582
583 work = kmalloc(sizeof(*work), GFP_ATOMIC);
584 if (work) {
585 INIT_WORK(work, do_thaw_all);
586 schedule_work(work);
587 }
581} 588}
582 589
583/** 590/**