Skip to content

Commit

Permalink
proc: copy_to_user() returns unsigned
Browse files Browse the repository at this point in the history
copy_to_user() returns the number of bytes left to be copied.

This was a typo from: d82ef02 "proc: pagemap: Hold mmap_sem during
page walk".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Apr 6, 2010
1 parent 5fbfb18 commit 309361e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/task_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 309361e

Please sign in to comment.