Re: [PATCH RFC 1/6] block: Rework bio_split() return value

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

 



On 19.09.24 11:25, John Garry wrote:
> -	BUG_ON(sectors <= 0);
> -	BUG_ON(sectors >= bio_sectors(bio));
> +	if (WARN_ON(sectors <= 0))
> +		return ERR_PTR(-EINVAL);
> +	if (WARN_ON(sectors >= bio_sectors(bio)))
> +		return ERR_PTR(-EINVAL);

Nit: WARN_ON_ONCE() otherwise it'll trigger endless amounts of 
stacktraces in dmesg.




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux