block: ratelimit handle_bad_sector() message
[platform/kernel/linux-rpi.git] / block / blk-core.c
index 3b01e7f..ac00d2f 100644 (file)
@@ -646,11 +646,10 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector)
 {
        char b[BDEVNAME_SIZE];
 
-       printk(KERN_INFO "attempt to access beyond end of device\n");
-       printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n",
-                       bio_devname(bio, b), bio->bi_opf,
-                       (unsigned long long)bio_end_sector(bio),
-                       (long long)maxsector);
+       pr_info_ratelimited("attempt to access beyond end of device\n"
+                           "%s: rw=%d, want=%llu, limit=%llu\n",
+                           bio_devname(bio, b), bio->bi_opf,
+                           bio_end_sector(bio), maxsector);
 }
 
 #ifdef CONFIG_FAIL_MAKE_REQUEST