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

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

Advertisement

Kernel v2.4.6 /mm/memory.c

Filename:/mm/memory.c
Lines Added:1
Lines Deleted:19
Also changed in: (Previous) 2.4.6-pre9  2.4.6-pre8  2.4.6-pre7  2.4.6-pre6  2.4.6-pre5  2.4.6-pre4 
(Following) 2.4.6-ac1  2.4.6-ac2  2.4.6-ac3  2.4.6-ac4  2.4.6-ac5  2.4.7-pre4 

Location
[  2.4.6
  [  mm
     o  memory.c

Patch

diff -u --recursive --new-file v2.4.5/linux/mm/memory.c linux/mm/memory.c
--- v2.4.5/linux/mm/memory.c   Fri Apr 27 14:23:25 2001
+++ linux/mm/memory.c   Mon Jun 11 19:15:27 2001
@@ -274,7 +274,7 @@
        */
       if (pte_dirty(pte) && page->mapping)
          set_page_dirty(page);
-      page_cache_release(page);
+      free_page_and_swap_cache(page);
       return 1;
    }
    swap_free(pte_to_swp_entry(pte));
@@ -870,24 +870,6 @@
    flush_cache_page(vma, address);
    establish_pte(vma, address, page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot))));
 }
-
-/*
- * Work out if there are any other processes sharing this
- * swap cache page. Never mind the buffers.
- */
-static inline int exclusive_swap_page(struct page *page)
-{
-   unsigned int count;
-
-   if (!PageLocked(page))
-      BUG();
-   if (!PageSwapCache(page))
-      return 0;
-   count = page_count(page) - !!page->buffers;   /*  2: us + swap cache */
-   count += swap_count(page);         /* +1: just swap cache */
-   return count == 3;            /* =3: total */
-}
-
 
 /*
  * This routine handles present pages, when users try to write


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