提交 36a7347d 编写于 作者: A Andreas Gruenbacher 提交者: 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: NAndreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册