]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
buffer: switch do_emergency_thaw() away from pdflush_operation()
authorJens Axboe <jens.axboe@oracle.com>
Wed, 8 Apr 2009 11:44:08 +0000 (13:44 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 15 Apr 2009 06:28:12 +0000 (08:28 +0200)
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>
fs/buffer.c

index 13edf7ad3ff1524032d043ec10aa3b13465103ef..ff8bb1f2333a05c96eb96fba2b24d49fa6218948 100644 (file)
@@ -547,7 +547,7 @@ repeat:
        return err;
 }
 
-void do_thaw_all(unsigned long unused)
+void do_thaw_all(struct work_struct *work)
 {
        struct super_block *sb;
        char b[BDEVNAME_SIZE];
@@ -567,6 +567,7 @@ restart:
                        goto restart;
        }
        spin_unlock(&sb_lock);
+       kfree(work);
        printk(KERN_WARNING "Emergency Thaw complete\n");
 }
 
@@ -577,7 +578,13 @@ restart:
  */
 void emergency_thaw_all(void)
 {
-       pdflush_operation(do_thaw_all, 0);
+       struct work_struct *work;
+
+       work = kmalloc(sizeof(*work), GFP_ATOMIC);
+       if (work) {
+               INIT_WORK(work, do_thaw_all);
+               schedule_work(work);
+       }
 }
 
 /**