From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Philipp Reisner <philipp.reisner@linbit.com>,
Kees Cook <keescook@chromium.org>,
linux-block@vger.kernel.org, drbd-dev@lists.linbit.com,
linux-security-module@vger.kernel.org
Subject: [PATCH 5/5] loadpin: stop using bdevname
Date: Thu, 3 Mar 2022 14:32:23 +0300 [thread overview]
Message-ID: <20220303113223.326220-6-hch@lst.de> (raw)
In-Reply-To: <20220303113223.326220-1-hch@lst.de>
Use the %pg format specifier to save on stack consuption and code size.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
security/loadpin/loadpin.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c
index b12f7d986b1e3..ad4e6756c0386 100644
--- a/security/loadpin/loadpin.c
+++ b/security/loadpin/loadpin.c
@@ -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");
--
2.30.2
next prev parent reply other threads:[~2022-03-03 11:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 11:32 a few trivial bdevname() removals Christoph Hellwig
2022-03-03 11:32 ` [PATCH 1/5] block: stop using bdevname in bdev_write_inode Christoph Hellwig
2022-03-03 15:33 ` Johannes Thumshirn
2022-03-03 11:32 ` [PATCH 2/5] block: stop using bdevname in __blkdev_issue_discard Christoph Hellwig
2022-03-03 15:34 ` Johannes Thumshirn
2022-03-03 11:32 ` [PATCH 3/5] block: stop using bdevname in drbd_report_io_error Christoph Hellwig
2022-03-03 15:34 ` Johannes Thumshirn
2022-03-03 11:32 ` [PATCH 4/5] pktcdvd: stop using bdevname Christoph Hellwig
2022-03-03 15:34 ` Johannes Thumshirn
2022-03-03 11:32 ` Christoph Hellwig [this message]
2022-03-03 15:35 ` [PATCH 5/5] loadpin: " Johannes Thumshirn
2022-03-03 17:29 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220303113223.326220-6-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=keescook@chromium.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=philipp.reisner@linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).