patch-1.3.57 linux/include/linux/pagemap.h

Next file: linux/include/linux/proc_fs.h
Previous file: linux/include/linux/module.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.56/linux/include/linux/pagemap.h linux/include/linux/pagemap.h
@@ -39,16 +39,6 @@
 
 #define page_hash(inode,offset) page_hash_table[_page_hashfn(inode,offset)]
 
-static inline int page_age_update(struct page * page, int accessed)
-{
-	unsigned int age = page->age;
-	if (accessed)
-		age |= PAGE_AGE_VALUE << 1;
-	age >>= 1;
-	page->age = age;
-	return age > (PAGE_AGE_VALUE >> 1);
-}
-
 static inline struct page * find_page(struct inode * inode, unsigned long offset)
 {
 	struct page *page;
@@ -58,7 +48,7 @@
 			continue;
 		if (page->offset != offset)
 			continue;
-		page->age = PAGE_AGE_VALUE | (page->age >> 1);
+		page->referenced = 1;
 		page->count++;
 		break;
 	}
@@ -84,6 +74,7 @@
 	struct page **p = &page_hash(inode,page->offset);
 
 	page_cache_size++;
+	page->referenced = 1;
 	page->age = PAGE_AGE_VALUE;
 	page->prev_hash = NULL;
 	if ((page->next_hash = *p) != NULL)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this