X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=mm%2Fpdflush.c;fp=mm%2Fpdflush.c;h=4842716d128cff36503d3f0ae36d851f1d508360;hb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;hp=c4b6d0afd73605cdc446a1cd9fc75aca8afb3693;hpb=1db395853d4f30d6120458bd279ede1f882a8525;p=linux-2.6.git diff --git a/mm/pdflush.c b/mm/pdflush.c index c4b6d0afd..4842716d1 100644 --- a/mm/pdflush.c +++ b/mm/pdflush.c @@ -104,21 +104,20 @@ static int __pdflush(struct pdflush_work *my_work) list_move(&my_work->list, &pdflush_list); my_work->when_i_went_to_sleep = jiffies; spin_unlock_irq(&pdflush_lock); - schedule(); - if (try_to_freeze()) { - spin_lock_irq(&pdflush_lock); - continue; - } - + try_to_freeze(); spin_lock_irq(&pdflush_lock); if (!list_empty(&my_work->list)) { - printk("pdflush: bogus wakeup!\n"); + /* + * Someone woke us up, but without removing our control + * structure from the global list. swsusp will do this + * in try_to_freeze()->refrigerator(). Handle it. + */ my_work->fn = NULL; continue; } if (my_work->fn == NULL) { - printk("pdflush: NULL work function\n"); + printk("pdflush: bogus wakeup\n"); continue; } spin_unlock_irq(&pdflush_lock);