提交 53f96bfd 编写于 作者: A Andreas Gruenbacher 提交者: Caspar Zhang

iomap: fix page_done callback for short writes

commit 36a7347de097edf9c4d7203d09fa223c86479674 upstream

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: NHui Zhu <teawaterz@linux.alibaba.com>
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>
Reviewed-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
上级 a74e2556
......@@ -777,7 +777,7 @@ iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
}
if (iomap->page_done)
iomap->page_done(inode, pos, copied, page, iomap);
iomap->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.
先完成此消息的编辑!
想要评论请 注册