Skip to content

Commit ed5edd5

Browse files
Christoph Hellwigkees
authored andcommitted
loadpin: stop using bdevname
Use the %pg format specifier to save on stack consuption and code size. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a5f4d9d commit ed5edd5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

security/loadpin/loadpin.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,8 @@ static void check_pinning_enforcement(struct super_block *mnt_sb)
7878
* device, allow sysctl to change modes for testing.
7979
*/
8080
if (mnt_sb->s_bdev) {
81-
char bdev[BDEVNAME_SIZE];
82-
8381
ro = bdev_read_only(mnt_sb->s_bdev);
84-
bdevname(mnt_sb->s_bdev, bdev);
85-
pr_info("%s (%u:%u): %s\n", bdev,
82+
pr_info("%pg (%u:%u): %s\n", mnt_sb->s_bdev,
8683
MAJOR(mnt_sb->s_bdev->bd_dev),
8784
MINOR(mnt_sb->s_bdev->bd_dev),
8885
ro ? "read-only" : "writable");

0 commit comments

Comments
 (0)