提交 309361e0 编写于 作者: D Dan Carpenter 提交者: Linus Torvalds

proc: copy_to_user() returns unsigned

copy_to_user() returns the number of bytes left to be copied.

This was a typo from: d82ef020 "proc: pagemap: Hold mmap_sem during
page walk".
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NMatt Mackall <mpm@selenic.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5fbfb18d
......@@ -800,7 +800,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
start_vaddr = end;
len = min(count, PM_ENTRY_BYTES * pm.pos);
if (copy_to_user(buf, pm.buffer, len) < 0) {
if (copy_to_user(buf, pm.buffer, len)) {
ret = -EFAULT;
goto out_free;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册