X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=mm%2Fpdflush.c;h=38ce279cc8cdf4fa3a83e29a8ffb509a0551c447;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=1e682bed9a5eeea1dfdee4d2836013b364c9dbac;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/mm/pdflush.c b/mm/pdflush.c index 1e682bed9..38ce279cc 100644 --- a/mm/pdflush.c +++ b/mm/pdflush.c @@ -17,7 +17,6 @@ #include #include #include -#include #include // Needed by writeback.h #include // Prototypes pdflush_operation() #include @@ -45,7 +44,7 @@ static void start_one_pdflush_thread(void); * All the pdflush threads. Protected by pdflush_lock */ static LIST_HEAD(pdflush_list); -static spinlock_t pdflush_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(pdflush_lock); /* * The count of currently-running pdflush threads. Protected @@ -106,8 +105,7 @@ static int __pdflush(struct pdflush_work *my_work) spin_unlock_irq(&pdflush_lock); schedule(); - if (current->flags & PF_FREEZE) { - refrigerator(PF_FREEZE); + if (try_to_freeze(PF_FREEZE)) { spin_lock_irq(&pdflush_lock); continue; }