mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
iomap: turn the byte variable in iomap_zero_iter into a ssize_t
@bytes also holds the return value from iomap_write_end, which can
contain a negative error value. As @bytes is always less than the page
size even the signed type can hold the entire possible range.
Fixes: c6f4046865
("fsdax: decouple zeroing from the iomap buffered I/O code")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211208091203.2927754-1-hch@lst.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
b80892ca02
commit
de291b5902
1 changed files with 1 additions and 1 deletions
|
@ -883,7 +883,7 @@ static loff_t iomap_zero_iter(struct iomap_iter *iter, bool *did_zero)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
unsigned offset = offset_in_page(pos);
|
unsigned offset = offset_in_page(pos);
|
||||||
size_t bytes = min_t(u64, PAGE_SIZE - offset, length);
|
ssize_t bytes = min_t(u64, PAGE_SIZE - offset, length);
|
||||||
struct page *page;
|
struct page *page;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue