proc: copy_to_user() returns unsigned
authorDan Carpenter <error27@gmail.com>
Tue, 6 Apr 2010 10:45:39 +0000 (13:45 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Apr 2010 15:23:47 +0000 (08:23 -0700)
copy_to_user() returns the number of bytes left to be copied.

This was a typo from: d82ef020cf31 "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>
fs/proc/task_mmu.c

index caf0337dff734e6074522f6be33efacef53dc8c8..a05a669510a44c1d52540a520e7dc809b610cb95 100644 (file)
@@ -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;
                }