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

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

Advertisement

Kernel v2.4.9 /mm/filemap.c

Filename:/mm/filemap.c
Lines Added:9
Lines Deleted:5
Also changed in: (Previous) 2.4.9-pre4  2.4.8-ac4  2.4.8-ac5  2.4.8-ac3  2.4.8-ac2  2.4.8 
(Following) 2.4.9-ac1  2.4.9-ac2  2.4.9-ac3  2.4.9-ac4  2.4.9-ac5  2.4.9-ac6 

Location
[  2.4.9
  [  mm
     o  filemap.c

Patch

diff -u --recursive --new-file v2.4.8/linux/mm/filemap.c linux/mm/filemap.c
--- v2.4.8/linux/mm/filemap.c   Sun Aug 12 13:28:01 2001
+++ linux/mm/filemap.c   Thu Aug 16 11:12:07 2001
@@ -45,12 +45,12 @@
 unsigned int page_hash_bits;
 struct page **page_hash_table;
 
-spinlock_t pagecache_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t __cacheline_aligned pagecache_lock = SPIN_LOCK_UNLOCKED;
 /*
  * NOTE: to avoid deadlocking you must never acquire the pagecache_lock with
  *       the pagemap_lru_lock held.
  */
-spinlock_t pagemap_lru_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t __cacheline_aligned pagemap_lru_lock = SPIN_LOCK_UNLOCKED;
 
 #define CLUSTER_PAGES      (1 << page_cluster)
 #define CLUSTER_OFFSET(x)   (((x) >> page_cluster) << page_cluster)
@@ -979,9 +979,13 @@
 
 static inline void check_used_once (struct page *page)
 {
-   if (!page->age) {
-      page->age = PAGE_AGE_START;
-      ClearPageReferenced(page);
+   if (!PageActive(page)) {
+      if (page->age)
+         activate_page(page);
+      else {
+         page->age = PAGE_AGE_START;
+         ClearPageReferenced(page);
+      }
    }
 }
 


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