]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/i386/lib/usercopy.c
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / i386 / lib / usercopy.c
index c5aa65f7c02a68d096e966286f0dfdfcc879bed9..08502fc6d0cb8d0fc819682d26b499e5aab08efb 100644 (file)
@@ -5,7 +5,6 @@
  * Copyright 1997 Andi Kleen <ak@muc.de>
  * Copyright 1997 Linus Torvalds
  */
-#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/highmem.h>
 #include <linux/blkdev.h>
@@ -740,7 +739,7 @@ survive:
                        retval = get_user_pages(current, current->mm,
                                        (unsigned long )to, 1, 1, 0, &pg, NULL);
 
-                       if (retval == -ENOMEM && current->pid == 1) {
+                       if (retval == -ENOMEM && is_init(current)) {
                                up_read(&current->mm->mmap_sem);
                                blk_congestion_wait(WRITE, HZ/50);
                                goto survive;
@@ -844,7 +843,6 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr
 unsigned long
 copy_to_user(void __user *to, const void *from, unsigned long n)
 {
-       might_sleep();
        BUG_ON((long) n < 0);
        if (access_ok(VERIFY_WRITE, to, n))
                n = __copy_to_user(to, from, n);
@@ -871,7 +869,6 @@ EXPORT_SYMBOL(copy_to_user);
 unsigned long
 copy_from_user(void *to, const void __user *from, unsigned long n)
 {
-       might_sleep();
        BUG_ON((long) n < 0);
        if (access_ok(VERIFY_READ, from, n))
                n = __copy_from_user(to, from, n);