From afc833aa34bec1d22bec2496450eb031dc68aa2e Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 24 Feb 2017 18:07:21 -0900 Subject: bcache: fix a minor bug in journal read path Only triggered when we'd seen an invalid journal entry, so not likely to have affected anyone. This code should be refactored. --- drivers/md/bcache/journal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 91bc4ac557e6..d89c5339590f 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -732,10 +732,10 @@ reread: if (le64_to_cpu(j->seq) > *seq) *seq = le64_to_cpu(j->seq); -next_block: + blocks = __set_blocks(j, le32_to_cpu(j->u64s), block_bytes(c)); - +next_block: pr_debug("next"); bucket_offset += blocks * c->sb.block_size; sectors_read -= blocks * c->sb.block_size; -- cgit v1.2.3