diff mbox series

[2/2] md: use rdev_read_only in restart_array

Message ID 20210201131721.750412-3-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/2] md: check for NULL ->meta_bdev before calling bdev_read_only | expand

Commit Message

Christoph Hellwig Feb. 1, 2021, 1:17 p.m. UTC
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 mbox series

Patch

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();