Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118472
b: refs/heads/master
c: b27cf88
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Oct 31, 2008
1 parent ff3c365 commit 29668dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f04de505e3fa322728d1a851e08bf7060b117743
refs/heads/master: b27cf88e9592953ae292d05324887f2f44979433
10 changes: 5 additions & 5 deletions trunk/fs/jffs2/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ static int jffs2_garbage_collect_thread(void *_c)
for (;;) {
allow_signal(SIGHUP);
again:
spin_lock(&c->erase_completion_lock);
if (!jffs2_thread_should_wake(c)) {
set_current_state (TASK_INTERRUPTIBLE);
spin_unlock(&c->erase_completion_lock);
D1(printk(KERN_DEBUG "jffs2_garbage_collect_thread sleeping...\n"));
/* Yes, there's a race here; we checked jffs2_thread_should_wake()
before setting current->state to TASK_INTERRUPTIBLE. But it doesn't
matter - We don't care if we miss a wakeup, because the GC thread
is only an optimisation anyway. */
schedule();
}
} else
spin_unlock(&c->erase_completion_lock);


/* This thread is purely an optimisation. But if it runs when
other things could be running, it actually makes things a
Expand Down

0 comments on commit 29668dd

Please sign in to comment.