提交 75b7fe66 编写于 作者: Y Yu Kuai 提交者: Zheng Zengkai

Revert "mm/filemap: fix that first page is not mark accessed in filemap_read()"

hulk inclusion
category: bugfix
bugzilla: 186896, https://gitee.com/src-openeuler/kernel/issues/I5GZC8
CVE: NA

--------------------------------

This reverts commit 499ecade.

Prepare to backport solution from mainline.
Signed-off-by: NYu Kuai <yukuai3@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 353a77e5
......@@ -2551,11 +2551,10 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb,
flush_dcache_page(pages[i]);
copied = copy_page_to_iter(pages[i], offset, bytes, iter);
if (copied) {
ra->prev_pos = iocb->ki_pos;
written += copied;
iocb->ki_pos += copied;
}
written += copied;
iocb->ki_pos += copied;
ra->prev_pos = iocb->ki_pos;
if (copied < bytes) {
error = -EFAULT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册