Linux-Raid Archives on lore.kernel.org
 help / color / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk, song@kernel.org
Cc: guoqing.jiang@cloud.ionos.com, linux-block@vger.kernel.org,
	linux-raid@vger.kernel.org
Subject: [PATCH 2/2] md: use rdev_read_only in restart_array
Date: Mon,  1 Feb 2021 14:17:21 +0100
Message-ID: <20210201131721.750412-3-hch@lst.de> (raw)
In-Reply-To: <20210201131721.750412-1-hch@lst.de>

Make the read-only check in restart_array identical to the other two
read-only checks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/md/md.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7c0f6107865383..21da0c48f6c21e 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6143,7 +6143,7 @@ static int restart_array(struct mddev *mddev)
 		if (test_bit(Journal, &rdev->flags) &&
 		    !test_bit(Faulty, &rdev->flags))
 			has_journal = true;
-		if (bdev_read_only(rdev->bdev))
+		if (rdev_read_only(rdev))
 			has_readonly = true;
 	}
 	rcu_read_unlock();
-- 
2.29.2


  parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 13:17 md read-only fixes Christoph Hellwig
2021-02-01 13:17 ` [PATCH 1/2] md: check for NULL ->meta_bdev before calling bdev_read_only Christoph Hellwig
2021-02-01 13:17 ` Christoph Hellwig [this message]
2021-02-01 16:35 ` md read-only fixes Jens Axboe
2021-02-18  9:30   ` Tkaczyk, Mariusz
2021-02-24  8:45     ` Song Liu

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=20210201131721.750412-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=guoqing.jiang@cloud.ionos.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@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

Linux-Raid Archives on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-raid/0 linux-raid/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-raid linux-raid/ https://lore.kernel.org/linux-raid \
		linux-raid@vger.kernel.org
	public-inbox-index linux-raid

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-raid


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git