diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2016-12-21 18:16:40 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-01-18 21:41:32 -0900 |
commit | 72e9eb845ba614f7c61b8731f037b7891ced31d1 (patch) | |
tree | b798baab54c8261fcd0636d876afc847261f5446 | |
parent | e869a3a639bcc2101212ab58a16af080c82c6bd8 (diff) |
bcache: fix a lost wakeup in the journal code
-rw-r--r-- | drivers/md/bcache/journal.c | 5 |
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); } /* |