X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=mm%2Fpdflush.c;h=9d834aa4b9795264d87eef283c2492a99d67597b;hb=8978a318837d7acefca82645017c0534aeba5a36;hp=8ce0900dc95ce13052ee6241f7cf6de91f828a8a;hpb=ea14fad0d416354a4e9bb1a04f32acba706f9548;p=linux-2.6-omap-h63xx.git diff --git a/mm/pdflush.c b/mm/pdflush.c index 8ce0900dc95..9d834aa4b97 100644 --- a/mm/pdflush.c +++ b/mm/pdflush.c @@ -17,8 +17,8 @@ #include #include #include -#include // Needed by writeback.h -#include // Prototypes pdflush_operation() +#include /* Needed by writeback.h */ +#include /* Prototypes pdflush_operation() */ #include #include #include @@ -92,6 +92,7 @@ struct pdflush_work { static int __pdflush(struct pdflush_work *my_work) { current->flags |= PF_FLUSHER | PF_SWAPWRITE; + set_freezable(); my_work->fn = NULL; my_work->who = current; INIT_LIST_HEAD(&my_work->list); @@ -186,8 +187,8 @@ static int pdflush(void *dummy) * This is needed as pdflush's are dynamically created and destroyed. * The boottime pdflush's are easily placed w/o these 2 lines. */ - cpus_allowed = cpuset_cpus_allowed(current); - set_cpus_allowed(current, cpus_allowed); + cpuset_cpus_allowed(current, &cpus_allowed); + set_cpus_allowed_ptr(current, &cpus_allowed); return __pdflush(&my_work); } @@ -206,7 +207,6 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0) spin_lock_irqsave(&pdflush_lock, flags); if (list_empty(&pdflush_list)) { - spin_unlock_irqrestore(&pdflush_lock, flags); ret = -1; } else { struct pdflush_work *pdf; @@ -218,8 +218,9 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0) pdf->fn = fn; pdf->arg0 = arg0; wake_up_process(pdf->who); - spin_unlock_irqrestore(&pdflush_lock, flags); } + spin_unlock_irqrestore(&pdflush_lock, flags); + return ret; }