]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: turn the byte variable in iomap_zero_iter into a ssize_t
authorChristoph Hellwig <hch@lst.de>
Wed, 8 Dec 2021 09:12:03 +0000 (10:12 +0100)
committerDan Williams <dan.j.williams@intel.com>
Wed, 8 Dec 2021 15:04:21 +0000 (07:04 -0800)
commitc6ea0fcf7e9347ff4d3c0fcdeab7a8a52f2b8a7f
treedc8c6ae05967bc267784f8b63936b978f128d204
parent29502878ab2e730790bd166529855311b3f6f5b7
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: d2476d4fe2d7 ("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>
fs/iomap/buffered-io.c