aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/journal.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-23 23:17:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-24 14:41:43 -0700
commit6d9d21e35fbfa2934339e96934f862d118abac23 (patch)
tree80222e590d8c8f126101e1cb15cc627833821418 /drivers/md/bcache/journal.c
parentblock: Fix bio_copy_data() (diff)
downloadlinux-dev-6d9d21e35fbfa2934339e96934f862d118abac23.tar.xz
linux-dev-6d9d21e35fbfa2934339e96934f862d118abac23.zip
bcache: Fix a dumb journal discard bug
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>
Diffstat (limited to 'drivers/md/bcache/journal.c')
-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 ba95ab84b2be..c0017ca32b76 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -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;