Commit 36a7347d authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Darrick J. Wong

iomap: fix page_done callback for short writes

When we truncate a short write to have it retried, pass the truncated
length to the page_done callback instead of the full length.
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 8af54f29
......@@ -799,7 +799,7 @@ iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
if (old_size < pos)
pagecache_isize_extended(inode, old_size, pos);
if (page_ops && page_ops->page_done)
page_ops->page_done(inode, pos, copied, page, iomap);
page_ops->page_done(inode, pos, ret, page, iomap);
put_page(page);
if (ret < len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment