Commit 053c525f authored by Jens Axboe's avatar Jens Axboe

buffer: switch do_emergency_thaw() away from pdflush_operation()

This is (again) a preparatory patch similar to commit
a2a9537a. 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: default avatarJens Axboe <jens.axboe@oracle.com>
parent 329007ce
...@@ -547,7 +547,7 @@ repeat: ...@@ -547,7 +547,7 @@ repeat:
return err; return err;
} }
void do_thaw_all(unsigned long unused) void do_thaw_all(struct work_struct *work)
{ {
struct super_block *sb; struct super_block *sb;
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];
...@@ -567,6 +567,7 @@ restart: ...@@ -567,6 +567,7 @@ restart:
goto restart; goto restart;
} }
spin_unlock(&sb_lock); spin_unlock(&sb_lock);
kfree(work);
printk(KERN_WARNING "Emergency Thaw complete\n"); printk(KERN_WARNING "Emergency Thaw complete\n");
} }
...@@ -577,7 +578,13 @@ restart: ...@@ -577,7 +578,13 @@ restart:
*/ */
void emergency_thaw_all(void) 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);
}
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment