Skip to content

Commit

Permalink
mm/pdflush.c: merge the same code in two path
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Denis Cheng authored and Linus Torvalds committed May 13, 2008
1 parent 241937b commit 5aecd55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/pdflush.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,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;
Expand All @@ -219,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;
}

Expand Down

0 comments on commit 5aecd55

Please sign in to comment.