[PATCH 3/6] block: add a hard-readonly flag to struct gendisk

Martin K. Petersen martin.petersen at oracle.com
Tue Dec 8 00:28:57 EST 2020


Christoph,

> diff --git a/block/blk-core.c b/block/blk-core.c
> index ad041e903b0a8f..ecd68415c6acad 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -693,7 +693,7 @@ static inline bool should_fail_request(struct block_device *part,
>  
>  static inline bool bio_check_ro(struct bio *bio)
>  {
> -	if (op_is_write(bio_op(bio)) && bio->bi_bdev->bd_read_only) {
> +	if (op_is_write(bio_op(bio)) && bdev_read_only(bio->bi_bdev))

Build failure, opening brace is missing ^^^^^

>  		char b[BDEVNAME_SIZE];
>  
>  		if (op_is_flush(bio->bi_opf) && !bio_sectors(bio))

-- 
Martin K. Petersen	Oracle Linux Engineering



More information about the Linux-nvme mailing list