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: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Andreas Gruenbacher 2019-06-27 17:28:41 -07:00 committed by Darrick J. Wong
parent 8af54f291e
commit 36a7347de0
1 changed files with 1 additions and 1 deletions

View File

@ -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)