From: Christoph Hellwig <hch@lst.de>
To: Carlos Maiolino <cem@kernel.org>
Cc: linux-xfs@vger.kernel.org, Hans Holmberg <Hans.Holmberg@wdc.com>
Subject: [PATCH 3/4] xfs: use xfs_readonly_buftarg in xfs_remount_rw
Date: Thu, 5 Jun 2025 08:16:29 +0200 [thread overview]
Message-ID: <20250605061638.993152-4-hch@lst.de> (raw)
In-Reply-To: <20250605061638.993152-1-hch@lst.de>
Use xfs_readonly_buftarg instead of open coding it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_super.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 0bc4b5489078..bb0a82635a77 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -2020,14 +2020,13 @@ xfs_remount_rw(
int error;
if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp &&
- bdev_read_only(mp->m_logdev_targp->bt_bdev)) {
+ xfs_readonly_buftarg(mp->m_logdev_targp)) {
xfs_warn(mp,
"ro->rw transition prohibited by read-only logdev");
return -EACCES;
}
- if (mp->m_rtdev_targp &&
- bdev_read_only(mp->m_rtdev_targp->bt_bdev)) {
+ if (mp->m_rtdev_targp && xfs_readonly_buftarg(mp->m_rtdev_targp)) {
xfs_warn(mp,
"ro->rw transition prohibited by read-only rtdev");
return -EACCES;
--
2.47.2
next prev parent reply other threads:[~2025-06-05 6:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 6:16 misc fixes Christoph Hellwig
2025-06-05 6:16 ` [PATCH 1/4] xfs: check for shutdown before going to sleep in xfs_select_zone Christoph Hellwig
2025-06-05 6:42 ` Shinichiro Kawasaki
2025-06-05 12:02 ` Hans Holmberg
2025-06-05 6:16 ` [PATCH 2/4] xfs: remove NULL pointer checks in xfs_mru_cache_insert Christoph Hellwig
2025-06-05 12:04 ` Hans Holmberg
2025-06-05 6:16 ` Christoph Hellwig [this message]
2025-06-05 7:24 ` [PATCH 3/4] xfs: use xfs_readonly_buftarg in xfs_remount_rw John Garry
2025-06-05 12:05 ` Hans Holmberg
2025-06-05 6:16 ` [PATCH 4/4] xfs: move xfs_submit_zoned_bio a bit Christoph Hellwig
2025-06-05 12:07 ` Hans Holmberg
2025-06-16 8:02 ` Carlos Maiolino
2025-06-16 12:31 ` misc fixes Carlos Maiolino
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=20250605061638.993152-4-hch@lst.de \
--to=hch@lst.de \
--cc=Hans.Holmberg@wdc.com \
--cc=cem@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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