linux/mmnommu/filemap.c
/*
 * This adds the requested page to the page cache if it isn't already there,
 * and schedules an I/O to read in its contents from disk.
 */
This adds the requested page to the page cache if it isn't already there,
and schedules an I/O to read in its contents from disk.
This adds the requested page to the page cache if it isn ' t already there and schedules an I / O to read in its contents from disk .
static inline int page_cache_read(struct file * file, unsigned long offset) 
{
	struct inode *inode = file->f_dentry->d_inode;
	struct address_space *mapping = inode->i_mapping;
	struct page **hash = page_hash(mapping, offset);
	struct page *page; 
	spin_lock(&pagecache_lock);
	page = __find_page_nolock(mapping, offset, *hash); 
	spin_unlock(&pagecache_lock);
	if (page)
		return 0;
	page = page_cache_alloc();
	if (!page)
		return -ENOMEM;
	if (!add_to_page_cache_unique(page, mapping, offset, hash)) {
		int error = mapping->a_ops->readpage(file, page);
		page_cache_release(page);
		return error;
	}
	page_cache_free(page);
	return 0;
}
static inline int page_cache_read ( struct file * file , unsigned long offset ) { struct inode * inode = file -> f_dentry -> d_inode ; struct address_space * mapping = inode -> i_mapping ; struct page * * hash = page_hash ( mapping , offset ) ; struct page * page ; spin_lock ( & pagecache_lock ) ; page = __find_page_nolock ( mapping , offset , * hash ) ; spin_unlock ( & pagecache_lock ) ; if ( page ) return 0 ; page = page_cache_alloc ( ) ; if ( ! page ) return - ENOMEM ; if ( ! add_to_page_cache_unique ( page , mapping , offset , hash ) ) { int error = mapping -> a_ops -> readpage ( file , page ) ; page_cache_release ( page ) ; return error ; } page_cache_free ( page ) ; return 0 ; }
This adds the requested page to the page cache if it isn't already there,
 and schedules an I/O to read in its contents from disk.
This adds the requested page to the page cache if it isn ' t already there and schedules an I / O to read in its contents from disk .
/*
	 * We arrive here in the unlikely event that someone 
	 * raced with us and added our page to the cache first.
	 */