From: Kent Overstreet Date: Tue, 24 Sep 2013 06:17:27 +0000 (-0700) Subject: bcache: Fix a dumb journal discard bug X-Git-Tag: upstream/snapshot3+hdmi~4259^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d9d21e35fbfa2934339e96934f862d118abac23;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Cc: linux-stable # >= v3.10 Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index ba95ab8..c0017ca 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;