提交 5aaa432a 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

ceph: pass proper page offset to copy_page_to_iter()

Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
上级 c5c9a0bf
......@@ -470,8 +470,11 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *i,
size_t left = ret;
while (left) {
int copy = min_t(size_t, PAGE_SIZE, left);
l = copy_page_to_iter(pages[k++], 0, copy, i);
size_t page_off = off & ~PAGE_MASK;
size_t copy = min_t(size_t,
PAGE_SIZE - page_off, left);
l = copy_page_to_iter(pages[k++], page_off,
copy, i);
off += l;
left -= l;
if (l < copy)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册