Skip to content

Commit

Permalink
bcache: Fix a dumb journal discard bug
Browse files Browse the repository at this point in the history
That switch statement was obviously wrong, leading to some sort of weird
spinning on rare occasion with discards enabled...

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.10
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Kent Overstreet authored and Linus Torvalds committed Sep 24, 2013
1 parent 2f6cf0d commit 6d9d21e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/bcache/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,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;

Expand Down

0 comments on commit 6d9d21e

Please sign in to comment.