Commit ffab9e04 authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] One more fix for swsusp

As andrew pointed out, it is bad idea to run_task_queue() when
spinlock is held. This fixes it (only could be triggered by user
pressing Magic-D). There's minor problem left where Magic-D could be
delayed/ignored under high load. I'll either fix that or kill Magic-D
support (with acpi, it is very easy to trigger swsusp by echo 4 >
/proc/acpi/sleep, so magic key is probably not neccessary any more).
parent 79eb6a12
...@@ -108,16 +108,16 @@ static int __pdflush(struct pdflush_work *my_work) ...@@ -108,16 +108,16 @@ static int __pdflush(struct pdflush_work *my_work)
for ( ; ; ) { for ( ; ; ) {
struct pdflush_work *pdf; struct pdflush_work *pdf;
#ifdef CONFIG_SOFTWARE_SUSPEND
run_task_queue(&tq_bdflush);
#endif
list_add(&my_work->list, &pdflush_list); list_add(&my_work->list, &pdflush_list);
my_work->when_i_went_to_sleep = jiffies; my_work->when_i_went_to_sleep = jiffies;
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&pdflush_lock); spin_unlock_irq(&pdflush_lock);
#ifdef CONFIG_SOFTWARE_SUSPEND
run_task_queue(&tq_bdflush);
if (current->flags & PF_FREEZE) if (current->flags & PF_FREEZE)
refrigerator(PF_IOTHREAD); refrigerator(PF_IOTHREAD);
#endif
schedule(); schedule();
preempt_enable(); preempt_enable();
......
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