kernels/linux-2.4.0/mm/filemap.c
/*
 * Add a page to the inode page cache.
 *
 * The caller must have locked the page and 
 * set all the page flags correctly..
 */
Add a page to the inode page cache.
The caller must have locked the page and
set all the page flags correctly
Add a page to the inode page cache . The caller must have locked the page and set all the page flags correctly
void add_to_page_cache_locked(struct page * page, struct address_space *mapping, unsigned long index)
{
	if (!PageLocked(page))
		BUG();
	page_cache_get(page);
	spin_lock(&pagecache_lock);
	page->index = index;
	add_page_to_inode_queue(mapping, page);
	add_page_to_hash_queue(page, page_hash(mapping, index));
	lru_cache_add(page);
	spin_unlock(&pagecache_lock);
}
void add_to_page_cache_locked ( struct page * page , struct address_space * mapping , unsigned long index ) { if ( ! PageLocked ( page ) ) BUG ( ) ; page_cache_get ( page ) ; spin_lock ( & pagecache_lock ) ; page -> index = index ; add_page_to_inode_queue ( mapping , page ) ; add_page_to_hash_queue ( page , page_hash ( mapping , index ) ) ; lru_cache_add ( page ) ; spin_unlock ( & pagecache_lock ) ; }
Add a page to the inode page cache.
Add a page to the inode page cache .