Commit 0a22f485 authored by Kent Overstreet's avatar Kent Overstreet Committed by Greg Kroah-Hartman

bcache: Fix a dumb journal discard bug

commit 6d9d21e3 upstream.

That switch statement was obviously wrong, leading to some sort of weird
spinning on rare occasion with discards enabled...
Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8a1cf0b
......@@ -425,7 +425,7 @@ static void do_journal_discard(struct cache *ca)
return;
}
switch (atomic_read(&ja->discard_in_flight) == DISCARD_IN_FLIGHT) {
switch (atomic_read(&ja->discard_in_flight)) {
case DISCARD_IN_FLIGHT:
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment