Commit d4c64640 authored by Linus Torvalds's avatar Linus Torvalds

Merge home.transmeta.com:/home/torvalds/v2.5/preemption

into home.transmeta.com:/home/torvalds/v2.5/linux
parents ffab9e04 eb245678
...@@ -79,12 +79,6 @@ struct pdflush_work { ...@@ -79,12 +79,6 @@ struct pdflush_work {
unsigned long when_i_went_to_sleep; unsigned long when_i_went_to_sleep;
}; };
/*
* preemption is disabled in pdflush. There was a bug in preempt
* which was causing pdflush to get flipped into state TASK_RUNNING
* when it performed a spin_unlock. That bug is probably fixed,
* but play it safe. The preempt-off paths are very short.
*/
static int __pdflush(struct pdflush_work *my_work) static int __pdflush(struct pdflush_work *my_work)
{ {
daemonize(); daemonize();
...@@ -101,7 +95,6 @@ static int __pdflush(struct pdflush_work *my_work) ...@@ -101,7 +95,6 @@ static int __pdflush(struct pdflush_work *my_work)
my_work->fn = NULL; my_work->fn = NULL;
my_work->who = current; my_work->who = current;
preempt_disable();
spin_lock_irq(&pdflush_lock); spin_lock_irq(&pdflush_lock);
nr_pdflush_threads++; nr_pdflush_threads++;
// printk("pdflush %d [%d] starts\n", nr_pdflush_threads, current->pid); // printk("pdflush %d [%d] starts\n", nr_pdflush_threads, current->pid);
...@@ -120,10 +113,8 @@ static int __pdflush(struct pdflush_work *my_work) ...@@ -120,10 +113,8 @@ static int __pdflush(struct pdflush_work *my_work)
#endif #endif
schedule(); schedule();
preempt_enable();
if (my_work->fn) if (my_work->fn)
(*my_work->fn)(my_work->arg0); (*my_work->fn)(my_work->arg0);
preempt_disable();
/* /*
* Thread creation: For how long have there been zero * Thread creation: For how long have there been zero
...@@ -158,7 +149,6 @@ static int __pdflush(struct pdflush_work *my_work) ...@@ -158,7 +149,6 @@ static int __pdflush(struct pdflush_work *my_work)
nr_pdflush_threads--; nr_pdflush_threads--;
// printk("pdflush %d [%d] ends\n", nr_pdflush_threads, current->pid); // printk("pdflush %d [%d] ends\n", nr_pdflush_threads, current->pid);
spin_unlock_irq(&pdflush_lock); spin_unlock_irq(&pdflush_lock);
preempt_enable();
return 0; return 0;
} }
......
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