From: Johannes Weiner Date: Tue, 22 Sep 2009 00:03:00 +0000 (-0700) Subject: mm: document is_page_cache_freeable() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ceddc3a52d783fabbf1ba623601419b9d6337194;p=openwrt%2Fstaging%2Fblogic.git 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: Johannes Weiner Cc: Christoph Lameter Reviewed-by: Christoph Lameter Reviewed-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index f5b5f029288c..5be8107e7758 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -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; }