]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/sys_x86_64.c
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[linux-2.6] / arch / x86 / kernel / sys_x86_64.c
index 95485e63fd2fbe45c23c2489dd4651633e2f916d..3b360ef33817c9b618e661f452e682a43dfe91bc 100644 (file)
 #include <asm/uaccess.h>
 #include <asm/ia32.h>
 
-/*
- * sys_pipe() is the normal C calling standard for creating
- * a pipe. It's not the way Unix traditionally does this, though.
- */
-asmlinkage long sys_pipe(int __user *fildes)
-{
-       int fd[2];
-       int error;
-
-       error = do_pipe(fd);
-       if (!error) {
-               if (copy_to_user(fildes, fd, 2*sizeof(int)))
-                       error = -EFAULT;
-       }
-       return error;
-}
-
 asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags,
        unsigned long fd, unsigned long off)
 {
@@ -182,9 +165,9 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
 
        /* check if free_area_cache is useful for us */
        if (len <= mm->cached_hole_size) {
-               mm->cached_hole_size = 0;
-               mm->free_area_cache = mm->mmap_base;
-       }
+               mm->cached_hole_size = 0;
+               mm->free_area_cache = mm->mmap_base;
+       }
 
        /* either no address requested or can't fit in requested address hole */
        addr = mm->free_area_cache;
@@ -213,9 +196,9 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
                        /* remember the address as a hint for next time */
                        return (mm->free_area_cache = addr);
 
-               /* remember the largest hole we saw so far */
-               if (addr + mm->cached_hole_size < vma->vm_start)
-                       mm->cached_hole_size = vma->vm_start - addr;
+               /* remember the largest hole we saw so far */
+               if (addr + mm->cached_hole_size < vma->vm_start)
+                       mm->cached_hole_size = vma->vm_start - addr;
 
                /* try just below the current vma->vm_start */
                addr = vma->vm_start-len;
@@ -229,7 +212,7 @@ bottomup:
         * allocations.
         */
        mm->cached_hole_size = ~0UL;
-       mm->free_area_cache = TASK_UNMAPPED_BASE;
+       mm->free_area_cache = TASK_UNMAPPED_BASE;
        addr = arch_get_unmapped_area(filp, addr0, len, pgoff, flags);
        /*
         * Restore the topdown base: