OSDN Git Service

block: remove the NULL bdev check in bdev_read_only
authorChristoph Hellwig <hch@lst.de>
Sat, 9 Jan 2021 10:42:50 +0000 (11:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 01:15:57 +0000 (18:15 -0700)
commit6f0d9689b670bc9f9640ff87b3f9226b7806dea2
tree56428c55621af77d28f43ad7545416d6b2fb4218
parent1e0dcca9e1aa3caa1a0dc4300db1a091078fe40b
block: remove the NULL bdev check in bdev_read_only

Only a single caller can end up in bdev_read_only, so move the check
there.

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>
block/genhd.c
fs/super.c