projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edcf474
)
mm: document is_page_cache_freeable()
author
Johannes Weiner
<
[email protected]
>
Tue, 22 Sep 2009 00:03:00 +0000
(17:03 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 22 Sep 2009 14:17:38 +0000
(07:17 -0700)
Enlighten the reader of this code about what reference count makes a page
cache page freeable.
Signed-off-by: Johannes Weiner <
[email protected]
>
Cc: Christoph Lameter <
[email protected]
>
Reviewed-by: Christoph Lameter <
[email protected]
>
Reviewed-by: KOSAKI Motohiro <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/vmscan.c
patch
|
blob
|
history
diff --git
a/mm/vmscan.c
b/mm/vmscan.c
index f5b5f029288c6028b61a38304c5d78149d849480..5be8107e77580d2fdb9506104c7527812edc206b 100644
(file)
--- 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;
}