Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.3.7 /mm/mmap.c

Filename:/mm/mmap.c
Lines Added:5
Lines Deleted:1
Also changed in: (Previous) 2.3.6  2.3.4  2.2.7-ac4  2.2.7-ac3  2.2.7-ac2  2.2.6 
(Following) 2.3.9  2.3.10  2.3.12  2.3.15  2.3.17  2.3.22 

Location
[  2.3.7
  [  mm
     o  mmap.c

Patch

diff -u --recursive --new-file v2.3.6/linux/mm/mmap.c linux/mm/mmap.c
--- v2.3.6/linux/mm/mmap.c   Mon Jun  7 11:15:33 1999
+++ linux/mm/mmap.c   Wed Jun 16 19:26:27 1999
@@ -63,7 +63,7 @@
        return 1;
 
    free = buffermem >> PAGE_SHIFT;
-   free += page_cache_size;
+   free += atomic_read(&page_cache_size);
    free += nr_free_pages;
    free += nr_swap_pages;
    free -= (page_cache.min_percent + buffer_mem.min_percent + 2)*num_physpages/100; 
@@ -727,6 +727,10 @@
    struct mm_struct * mm = current->mm;
    struct vm_area_struct * vma;
    unsigned long flags, retval;
+
+   len = PAGE_ALIGN(len);
+   if (!len)
+      return addr;
 
    /*
     * mlock MCL_FUTURE?


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.