mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
iomap: iomap_write_end cleanup
In iomap_write_end(), only call iomap_write_failed() on the byte range that has failed. This should improve code readability, but doesn't fix an actual bug because iomap_write_failed() is called after updating the file size here and it only affects the memory beyond the end of the file. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
parent
b71450e2cc
commit
d74999c8c0
|
|
@ -734,7 +734,7 @@ static size_t iomap_write_end(struct iomap_iter *iter, loff_t pos, size_t len,
|
|||
folio_put(folio);
|
||||
|
||||
if (ret < len)
|
||||
iomap_write_failed(iter->inode, pos, len);
|
||||
iomap_write_failed(iter->inode, pos + ret, len - ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user