linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove unused code from do_wp_page
@ 2012-12-11 14:44 dingel
  2012-12-11 21:36 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: dingel @ 2012-12-11 14:44 UTC (permalink / raw)
  To: Andrew Morton, David Rientjes, Al Viro, Konstantin Khlebnikov,
	Andrea Arcangeli, linux-mm, linux-kernel
  Cc: Dominik Dingel

From: Dominik Dingel <dingel@linux.vnet.ibm.com>

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.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
---
 mm/memory.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 221fc9f..c322708 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2795,10 +2795,6 @@ oom_free_new:
 	page_cache_release(new_page);
 oom:
 	if (old_page) {
-		if (page_mkwrite) {
-			unlock_page(old_page);
-			page_cache_release(old_page);
-		}
 		page_cache_release(old_page);
 	}
 	return VM_FAULT_OOM;
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-11 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 14:44 [PATCH] remove unused code from do_wp_page dingel
2012-12-11 21:36 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).