Skip to content
Commit d7a47838 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

md: check for NULL ->meta_bdev before calling bdev_read_only

->meta_bdev is optional and not set for most arrays.  Add a
rdev_read_only helper that calls bdev_read_only for both devices
in a safe way.

Fixes: 6f0d9689

 ("block: remove the NULL bdev check in bdev_read_only")
Reported-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f7bf5e24
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment