mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
The block layer uses an unsigned short for max_segments. The way we calculate the value for NVMe tends to generate very large 32-bit values, which after integer truncation may lead to a zero value instead of the desired outcome. Signed-off-by: Christoph Hellwig <[email protected]> Reported-by: Jeff Lien <[email protected]> Tested-by: Jeff Lien <[email protected]> Reviewed-by: Keith Busch <[email protected]> Signed-off-by: Jens Axboe <[email protected]>