From 66521d5aa6c0f74b5e90c21569acbaa8c5ac0998 Mon Sep 17 00:00:00 2001 From: Dominik Dingel Date: Wed, 12 Dec 2012 13:52:37 -0800 Subject: [PATCH] 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/memory.c | 7 +------ 1 file changed, 1 insertion(+), 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: -- 2.20.1