]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
bcache: Fix a dumb journal discard bug
authorKent Overstreet <kmo@daterainc.com>
Thu, 18 Jul 2013 17:50:55 +0000 (10:50 -0700)
committerKent Overstreet <kmo@daterainc.com>
Fri, 26 Jul 2013 20:15:10 +0000 (13:15 -0700)
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
drivers/md/bcache/journal.c

index ba95ab84b2be5a5a32292625d229bb29e051a53d..c0017ca32b7662afec1de6a9640d7b0b012275fc 100644 (file)
@@ -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;