Commit ceddc3a5 authored by Johannes Weiner's avatar Johannes Weiner Committed by Linus Torvalds

mm: document is_page_cache_freeable()

Enlighten the reader of this code about what reference count makes a page
cache page freeable.
Signed-off-by: default avatarJohannes Weiner <>
Cc: Christoph Lameter <>
Reviewed-by: default avatarChristoph Lameter <>
Reviewed-by: default avatarKOSAKI Motohiro <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent edcf4748
......@@ -286,6 +286,11 @@ static inline int page_mapping_inuse(struct page *page)
static inline int is_page_cache_freeable(struct page *page)
* A freeable page cache page is referenced only by the caller
* that isolated the page, the page cache radix tree and
* optional buffer heads at page->private.
return page_count(page) - page_has_private(page) == 2;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment