summaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorDominik Dingel2012-12-12 22:52:37 +0100
committerLinus Torvalds2012-12-13 02:38:35 +0100
commit66521d5aa6c0f74b5e90c21569acbaa8c5ac0998 (patch)
treed77ac5afdf31d18bcf4e47b14fc19df9a6618f9b /mm/memory.c
parentasm-generic, mm: pgtable: consolidate zero page helpers (diff)
downloadkernel-qcow2-linux-66521d5aa6c0f74b5e90c21569acbaa8c5ac0998.tar.gz
kernel-qcow2-linux-66521d5aa6c0f74b5e90c21569acbaa8c5ac0998.tar.xz
kernel-qcow2-linux-66521d5aa6c0f74b5e90c21569acbaa8c5ac0998.zip
mm/memory.c: remove unused code from do_wp_page()
page_mkwrite is initalized with zero and only set once, from that point exists no way to get to the oom or oom_free_new labels. [akpm@linux-foundation.org: cleanup] Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 3f680e7c7645..db2e9e797a05 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2780,13 +2780,8 @@ unlock:
oom_free_new:
page_cache_release(new_page);
oom:
- if (old_page) {
- if (page_mkwrite) {
- unlock_page(old_page);
- page_cache_release(old_page);
- }
+ if (old_page)
page_cache_release(old_page);
- }
return VM_FAULT_OOM;
unwritable_page: