summaryrefslogtreecommitdiff
path: root/mm/pdflush.c
diff options
context:
space:
mode:
authorDenis Cheng <crquan@gmail.com>2008-05-12 14:02:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-13 08:02:24 -0700
commit5aecd559871d23a3cc297e544c9d63f0b8441cf4 (patch)
tree490290335041770d190ad2acab7c1e4570efc36c /mm/pdflush.c
parent241937b863c8a3ef10511712f53285f41ab05308 (diff)
downloadlinux-sh-5aecd559871d23a3cc297e544c9d63f0b8441cf4.tar.gz
mm/pdflush.c: merge the same code in two path
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>
Diffstat (limited to 'mm/pdflush.c')
-rw-r--r--mm/pdflush.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/pdflush.c b/mm/pdflush.c
index 1c96cfc9e040..9d834aa4b979 100644
--- a/mm/pdflush.c
+++ b/mm/pdflush.c
@@ -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;
@@ -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;
}