patch-2.0.8 linux/include/linux/pagemap.h
Next file: linux/include/net/ip_forward.h
Previous file: linux/include/linux/nfs_fs_i.h
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Sat Jul 20 09:19:57 1996
- Orig file:
v2.0.7/linux/include/linux/pagemap.h
- Orig date:
Wed Apr 17 09:06:32 1996
diff -u --recursive --new-file v2.0.7/linux/include/linux/pagemap.h linux/include/linux/pagemap.h
@@ -17,7 +17,7 @@
return PAGE_OFFSET + PAGE_SIZE * page->map_nr;
}
-#define PAGE_HASH_BITS 10
+#define PAGE_HASH_BITS 11
#define PAGE_HASH_SIZE (1 << PAGE_HASH_BITS)
#define PAGE_AGE_VALUE 16
@@ -48,16 +48,22 @@
{
struct page *page;
- for (page = page_hash(inode, offset); page ; page = page->next_hash) {
+ page = page_hash(inode, offset);
+ goto inside;
+ for (;;) {
+ page = page->next_hash;
+inside:
+ if (!page)
+ goto not_found;
if (page->inode != inode)
continue;
- if (page->offset != offset)
- continue;
- /* Found the page. */
- atomic_inc(&page->count);
- set_bit(PG_referenced, &page->flags);
- break;
+ if (page->offset == offset)
+ break;
}
+ /* Found the page. */
+ atomic_inc(&page->count);
+ set_bit(PG_referenced, &page->flags);
+not_found:
return page;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov