*参照元 [#r23730e0]
#backlinks

*説明 [#kd1bac38]
-パス: [[linux-2.6.33/mm/filemap.c]]

-FIXME: これは何?
--説明


**引数 [#u364411c]
-struct address_space *mapping
--
--[[linux-2.6.33/address_page]]

-pgoff_t offset
--


**返り値 [#jec5a816]
-
-struct page *
--


**参考 [#e062f97a]


*実装 [#f081d6d5]
 /**
  * find_get_page - find and get a page reference
  * @mapping: the address_space to search
  * @offset: the page index
  *
  * Is there a pagecache struct page at the given (mapping, offset) tuple?
  * If yes, increment its refcount and return it; if no, return NULL.
  */
 struct page *find_get_page(struct address_space *mapping, pgoff_t offset)
 {
 	void **pagep;
 	struct page *page;
 
-
--[[linux-2.6.33/page]]

 	rcu_read_lock();
-
--[[linux-2.6.33/rcu_read_lock()]]

 repeat:
 	page = NULL;
 	pagep = radix_tree_lookup_slot(&mapping->page_tree, offset);
-
--[[linux-2.6.33/radix_tree_lookup_slot()]]

 	if (pagep) {
 		page = radix_tree_deref_slot(pagep);
 		if (unlikely(!page || page == RADIX_TREE_RETRY))
 			goto repeat;
 
-
--[[linux-2.6.33/radix_tree_deref_slot()]]

 		if (!page_cache_get_speculative(page))
 			goto repeat;
 
-
--[[linux-2.6.33/page_cache_get_speculative()]]

 		/*
 		 * Has the page moved?
 		 * This is part of the lockless pagecache protocol. See
 		 * include/linux/pagemap.h for details.
 		 */
 		if (unlikely(page != *pagep)) {
 			page_cache_release(page);
 			goto repeat;
 		}
-
--[[linux-2.6.33/page_cache_release()]]

 	}
 	rcu_read_unlock();
 
-
--[[linux-2.6.33/rcu_read_unlock()]]

 	return page;
 }
 EXPORT_SYMBOL(find_get_page);
-特にライセンスを区別せずシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]


*コメント [#i0630ceb]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS