OSDN Git Service

md: use rdev_read_only in restart_array
authorChristoph Hellwig <hch@lst.de>
Mon, 1 Feb 2021 13:17:21 +0000 (14:17 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Feb 2021 16:35:20 +0000 (09:35 -0700)
Make the read-only check in restart_array identical to the other two
read-only checks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c

index 7c0f610..21da0c4 100644 (file)
@@ -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();