| Kernel v2.4.9 /mm/filemap.c |
|---|
 2.4.9
 mm
 filemap.c
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);
+ }
}
}
|