summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2016-12-21 18:16:40 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-01-18 21:41:32 -0900
commit72e9eb845ba614f7c61b8731f037b7891ced31d1 (patch)
treeb798baab54c8261fcd0636d876afc847261f5446
parente869a3a639bcc2101212ab58a16af080c82c6bd8 (diff)
bcache: fix a lost wakeup in the journal code
-rw-r--r--drivers/md/bcache/journal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index 3c63a31c18f4..fb799ce47a4a 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -1529,6 +1529,7 @@ int bch_cache_journal_alloc(struct cache *ca)
static void journal_reclaim_fast(struct journal *j)
{
struct journal_entry_pin_list temp;
+ bool popped = false;
lockdep_assert_held(&j->lock);
@@ -1539,7 +1540,11 @@ static void journal_reclaim_fast(struct journal *j)
while (!atomic_read(&fifo_peek_front(&j->pin).count)) {
BUG_ON(!list_empty(&fifo_peek_front(&j->pin).list));
BUG_ON(!fifo_pop(&j->pin, temp));
+ popped = true;
}
+
+ if (popped)
+ wake_up(&j->wait);
}
/*