aboutsummaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-23 23:17:27 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 07:13:09 -0700
commit0a22f485eee6ae8da77c3e37c8856e025678cdb0 (patch)
tree204c0a8796bfd83ea8f8b99f5ac8023e68c2d5ae /drivers/md
parentd8a1cf0bdbf668951b3ad4dfea4cde19c3fbe432 (diff)
bcache: Fix a dumb journal discard bug
commit 6d9d21e35fbfa2934339e96934f862d118abac23 upstream. 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-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 b49abb246bb..fb1bfafa21e 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -425,7 +425,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;