diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-18 22:00:52 +0300 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-18 22:00:52 +0300 |
commit | f366d3854ec0fec0f9949dac46431598614a956b (patch) | |
tree | d60aa8b796ef2611b0ee28bccb38cca64a1aed2f /block/blk-lib.c | |
parent | ccec4a4a4f27b22e51ec6a143319db49b7570581 (diff) | |
parent | b422847877e35d6818f65cb359a60f529fe22c4b (diff) | |
download | linux-f366d3854ec0fec0f9949dac46431598614a956b.tar.xz |
Merge tag 'spi-nor/for-4.21' of git://git.infradead.org/linux-mtd into mtd/next
Core changes:
- Parse the 4BAIT SFDP section
- Add a bunch of SPI NOR entries to the flash_info table
- Add the concept of SFDP fixups and use it to fix a bug on MX25L25635F
- A bunch of minor cleanups/comestic changes
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r-- | block/blk-lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c index e8b3bb9bf375..5f2c429d4378 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -55,9 +55,11 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, return -EINVAL; while (nr_sects) { - unsigned int req_sects = min_t(unsigned int, nr_sects, + sector_t req_sects = min_t(sector_t, nr_sects, bio_allowed_max_sectors(q)); + WARN_ON_ONCE((req_sects << 9) > UINT_MAX); + bio = blk_next_bio(bio, 0, gfp_mask); bio->bi_iter.bi_sector = sector; bio_set_dev(bio, bdev); |