diff options
-rw-r--r-- | drivers/md/bcache/journal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index ee1d762f29b3..ccfc5a0beddf 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -550,6 +550,9 @@ static void bch_journal_read_device(struct closure *cl) unsigned i, l, r; u64 seq = 0; + if (!nr_buckets) + closure_return(cl); + bitmap_zero(bitmap, nr_buckets); pr_debug("%u journal buckets", nr_buckets); |