]> git.baikalelectronics.ru Git - kernel.git/commitdiff
block: stop using bdevname in bdev_write_inode
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Jul 2022 05:53:09 +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.  Also reformat the
printk statement to be more readable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
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-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bdev.c

index 5fe06c1f2def4196f736e183846b0a093ccaa73f..ce05175e71cea49ef0a9133c99395026f1426c8c 100644 (file)
@@ -54,12 +54,10 @@ static void bdev_write_inode(struct block_device *bdev)
        while (inode->i_state & I_DIRTY) {
                spin_unlock(&inode->i_lock);
                ret = write_inode_now(inode, true);
-               if (ret) {
-                       char name[BDEVNAME_SIZE];
-                       pr_warn_ratelimited("VFS: Dirty inode writeback failed "
-                                           "for block device %s (err=%d).\n",
-                                           bdevname(bdev, name), ret);
-               }
+               if (ret)
+                       pr_warn_ratelimited(
+       "VFS: Dirty inode writeback failed for block device %pg (err=%d).\n",
+                               bdev, ret);
                spin_lock(&inode->i_lock);
        }
        spin_unlock(&inode->i_lock);