loadpin: stop using bdevname

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2118511

commit ed5edd5a70b9525085403f193786395179ea303d
Author: Christoph Hellwig <hch@lst.de>
Date:   Thu May 12 08:20:14 2022 +0200

    loadpin: stop using bdevname

    Use the %pg format specifier to save on stack consuption and code size.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Link: https://lore.kernel.org/r/20220512062014.1826835-1-hch@lst.de

Signed-off-by: Ming Lei <ming.lei@redhat.com>
This commit is contained in:
Ming Lei 2022-09-14 20:59:00 +08:00
parent 230cf85f66
commit 15dd1a5e05
1 changed files with 1 additions and 4 deletions

View File

@ -78,11 +78,8 @@ static void check_pinning_enforcement(struct super_block *mnt_sb)
* device, allow sysctl to change modes for testing.
*/
if (mnt_sb->s_bdev) {
char bdev[BDEVNAME_SIZE];
ro = bdev_read_only(mnt_sb->s_bdev);
bdevname(mnt_sb->s_bdev, bdev);
pr_info("%s (%u:%u): %s\n", bdev,
pr_info("%pg (%u:%u): %s\n", mnt_sb->s_bdev,
MAJOR(mnt_sb->s_bdev->bd_dev),
MINOR(mnt_sb->s_bdev->bd_dev),
ro ? "read-only" : "writable");