mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
buffer: switch do_emergency_thaw() away from pdflush_operation()
This is (again) a preparatory patch similar to commit
a2a9537ac0
. 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>
This commit is contained in:
parent
329007ce25
commit
053c525fcf
1 changed files with 9 additions and 2 deletions
11
fs/buffer.c
11
fs/buffer.c
|
@ -547,7 +547,7 @@ static int osync_buffers_list(spinlock_t *lock, struct list_head *list)
|
||||||
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 @@ void do_thaw_all(unsigned long unused)
|
||||||
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 @@ void do_thaw_all(unsigned long unused)
|
||||||
*/
|
*/
|
||||||
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue