aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-24 02:17:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 10:13:09 -0400
commit0a22f485eee6ae8da77c3e37c8856e025678cdb0 (patch)
tree204c0a8796bfd83ea8f8b99f5ac8023e68c2d5ae
parentd8a1cf0bdbf668951b3ad4dfea4cde19c3fbe432 (diff)
bcache: Fix a dumb journal discard bug
commit 6d9d21e35fbfa2934339e96934f862d118abac23 upstream. 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/md/bcache/journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index b49abb246bb6..fb1bfafa21e4 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -425,7 +425,7 @@ static void do_journal_discard(struct cache *ca)
425 return; 425 return;
426 } 426 }
427 427
428 switch (atomic_read(&ja->discard_in_flight) == DISCARD_IN_FLIGHT) { 428 switch (atomic_read(&ja->discard_in_flight)) {
429 case DISCARD_IN_FLIGHT: 429 case DISCARD_IN_FLIGHT:
430 return; 430 return;
431 431