Re: [PATCH 06/10] block: ms_block: use blk_is_valid_logical_block_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020/07/21 19:54, Maxim Levitsky wrote:
> Signed-off-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
> ---
>  drivers/memstick/core/ms_block.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
> index d9ee8e3dc72da..e4df03e10fb46 100644
> --- a/drivers/memstick/core/ms_block.c
> +++ b/drivers/memstick/core/ms_block.c
> @@ -1727,7 +1727,7 @@ static int msb_init_card(struct memstick_dev *card)
>  	msb->pages_in_block = boot_block->attr.block_size * 2;
>  	msb->block_size = msb->page_size * msb->pages_in_block;
>  
> -	if (msb->page_size > PAGE_SIZE) {
> +	if (!(blk_is_valid_logical_block_size(msb->page_size))) {
>  		/* this isn't supported by linux at all, anyway*/
>  		dbg("device page %d size isn't supported", msb->page_size);
>  		return -EINVAL;
> 

Looks good to me.

Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx>

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux