OSDN Git Service

dm: use bdev_read_only to check if a device is read-only
authorChristoph Hellwig <hch@lst.de>
Sat, 9 Jan 2021 10:42:49 +0000 (11:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 01:15:57 +0000 (18:15 -0700)
commit1e0dcca9e1aa3caa1a0dc4300db1a091078fe40b
tree41a7cef2f3c4f1bdca2b9d78092b9194e6d1b4eb
parent6ee1d745b7c9fd573fba142a2efdad76a9f1cb04
dm: use bdev_read_only to check if a device is read-only

dm-thin and dm-cache also work on partitions, so use the proper
interface to check if the device is read-only.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/dm-cache-metadata.c
drivers/md/dm-thin-metadata.c