]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drbd: stop using bdevname in drbd_report_io_error
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Jul 2022 05:53:11 +0000 (07:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 Jul 2022 16:27:56 +0000 (10:27 -0600)
Just use the %pg format specifier instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220713055317.1888500-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_req.c

index e64bcfba30ef371aa075ca94e05bda2a439e2ec8..6d8dd14458c69096a4a771f297bcc5c9d1b79f45 100644 (file)
@@ -523,16 +523,14 @@ static void mod_rq_state(struct drbd_request *req, struct bio_and_error *m,
 
 static void drbd_report_io_error(struct drbd_device *device, struct drbd_request *req)
 {
-        char b[BDEVNAME_SIZE];
-
        if (!__ratelimit(&drbd_ratelimit_state))
                return;
 
-       drbd_warn(device, "local %s IO error sector %llu+%u on %s\n",
+       drbd_warn(device, "local %s IO error sector %llu+%u on %pg\n",
                        (req->rq_state & RQ_WRITE) ? "WRITE" : "READ",
                        (unsigned long long)req->i.sector,
                        req->i.size >> 9,
-                       bdevname(device->ldev->backing_bdev, b));
+                       device->ldev->backing_bdev);
 }
 
 /* Helper for HANDED_OVER_TO_NETWORK.