diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-09-24 10:17:27 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-25 01:41:43 +0400 |
commit | 6d9d21e35fbfa2934339e96934f862d118abac23 (patch) | |
tree | 80222e590d8c8f126101e1cb15cc627833821418 /drivers | |
parent | 2f6cf0de0281d210061ce976f2d42d246adc75bb (diff) | |
download | linux-6d9d21e35fbfa2934339e96934f862d118abac23.tar.xz |
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.c | 2 |
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; |