diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-17 16:54:18 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-17 16:54:18 +0300 |
commit | 5ffdff81cff9ae697b1d57fea9a86b6c6ede6078 (patch) | |
tree | 97f0dca0492ab5e8bf5fa37c2b88078cab4cd453 /drivers/block | |
parent | 575966e080270b7574175da35f7f7dd5ecd89ff4 (diff) | |
parent | ad6bf88a6c19a39fb3b0045d78ea880325dfcf15 (diff) | |
download | linux-5ffdff81cff9ae697b1d57fea9a86b6c6ede6078.tar.xz |
Merge tag 'block-5.5-2020-01-16' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
"Three fixes that should go into this release:
- The 32-bit segment size fix that I mentioned last week (Ming)
- Use uint for the block size (Mikulas)
- A null_blk zone write handling fix (Damien)"
* tag 'block-5.5-2020-01-16' of git://git.kernel.dk/linux-block:
block: fix an integer overflow in logical block size
null_blk: Fix zone write handling
block: fix get_max_segment_size() overflow on 32bit arch
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk_zoned.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/null_blk_zoned.c b/drivers/block/null_blk_zoned.c index 5cf49d9db95e..ed34785dd64b 100644 --- a/drivers/block/null_blk_zoned.c +++ b/drivers/block/null_blk_zoned.c @@ -129,11 +129,13 @@ static blk_status_t null_zone_write(struct nullb_cmd *cmd, sector_t sector, return BLK_STS_IOERR; case BLK_ZONE_COND_EMPTY: case BLK_ZONE_COND_IMP_OPEN: + case BLK_ZONE_COND_EXP_OPEN: + case BLK_ZONE_COND_CLOSED: /* Writes must be at the write pointer position */ if (sector != zone->wp) return BLK_STS_IOERR; - if (zone->cond == BLK_ZONE_COND_EMPTY) + if (zone->cond != BLK_ZONE_COND_EXP_OPEN) zone->cond = BLK_ZONE_COND_IMP_OPEN; zone->wp += nr_sectors; |