]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: Fix error handling in iomap_zero_iter()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 21 Dec 2021 04:44:50 +0000 (04:44 +0000)
committerDan Williams <dan.j.williams@intel.com>
Thu, 23 Dec 2021 22:04:11 +0000 (14:04 -0800)
commit3f8d572755b39c022e7f35438de2c9b658014ab3
tree8119f6030c2d07823cec9b9d5d4f6676a9dd9c20
parentcedf7a2bca588d73c27b87cb96b3e3b80e9c2fd1
iomap: Fix error handling in iomap_zero_iter()

iomap_write_end() does not return a negative errno to indicate an
error, but the number of bytes successfully copied.  It cannot return
an error today, so include a debugging assertion like the one in
iomap_unshare_iter().

Fixes: d2476d4fe2d7 ("fsdax: decouple zeroing from the iomap buffered I/O code")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211221044450.517558-1-willy@infradead.org
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/iomap/buffered-io.c