diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-03-04 17:29:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:35:14 -0500 |
commit | 6dbf6d3bb955d5a92005b6ecd6ffad2c5b95b963 (patch) | |
tree | 429960ea7e804a2454eb76271f4f58621a62e456 | |
parent | 427d5416f317681498337ab19218d195edea02d6 (diff) |
memcg: page_cache_release not __free_page
There's nothing wrong with mem_cgroup_charge failure in do_wp_page and
do_anonymous page using __free_page, but it does look odd when nearby code
uses page_cache_release: use that instead (while turning a blind eye to
ancient inconsistencies of page_cache_release versus put_page).
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: David Rientjes <rientjes@google.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hirokazu Takahashi <taka@valinux.co.jp>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index ce3c9e4492d8..7f8c03ec587c 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1711,7 +1711,7 @@ unlock: | |||
1711 | } | 1711 | } |
1712 | return ret; | 1712 | return ret; |
1713 | oom_free_new: | 1713 | oom_free_new: |
1714 | __free_page(new_page); | 1714 | page_cache_release(new_page); |
1715 | oom: | 1715 | oom: |
1716 | if (old_page) | 1716 | if (old_page) |
1717 | page_cache_release(old_page); | 1717 | page_cache_release(old_page); |
@@ -2163,7 +2163,7 @@ release: | |||
2163 | page_cache_release(page); | 2163 | page_cache_release(page); |
2164 | goto unlock; | 2164 | goto unlock; |
2165 | oom_free_page: | 2165 | oom_free_page: |
2166 | __free_page(page); | 2166 | page_cache_release(page); |
2167 | oom: | 2167 | oom: |
2168 | return VM_FAULT_OOM; | 2168 | return VM_FAULT_OOM; |
2169 | } | 2169 | } |