bcache: print error message earlier in __bch_check_keys()

Currently bch_dump_bucket() is called before dumping all buckets
information. If the cache device is quite large, it is possible that
before all buckets information dumpped out, the system is reset or
kmessage buffer is overwhelmed, the following error message has no
chance to be printed. Then the clue of error will be lost.

This patch prints the error message earlier, then there is chance to
cache them before the system reset or panic.

Signed-off-by: Coly Li <colyli@suse.de>
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c
index c9e5880..9821e75 100644
--- a/drivers/md/bcache/bset.c
+++ b/drivers/md/bcache/bset.c
@@ -99,12 +99,14 @@
 #endif
 	return;
 bug:
-	bch_dump_bucket(b_keys);
-
 	va_start(args, fmt);
 	vprintk(fmt, args);
 	va_end(args);
 
+	/* An early message before dump buckets info */
+	pr_err("\nbch_check_keys error:  %s:\n", err);
+	bch_dump_bucket(b_keys);
+
 	panic("bch_check_keys error:  %s:\n", err);
 }