summaryrefslogtreecommitdiffstats
path: root/drivers
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
parent2f6cf0de0281d210061ce976f2d42d246adc75bb (diff)
downloadlinux-6d9d21e35fbfa2934339e96934f862d118abac23.tar.bz2
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')
-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;