From: dingel@linux.vnet.ibm.com
To: Andrew Morton <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Konstantin Khlebnikov <khlebnikov@openvz.org>,
Andrea Arcangeli <aarcange@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Dominik Dingel <dingel@linux.vnet.ibm.com>
Subject: [PATCH] remove unused code from do_wp_page
Date: Tue, 11 Dec 2012 15:44:50 +0100 [thread overview]
Message-ID: <1355237090-52434-1-git-send-email-dingel@linux.vnet.ibm.com> (raw)
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2012-12-11 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 14:44 dingel [this message]
2012-12-11 21:36 ` [PATCH] remove unused code from do_wp_page Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355237090-52434-1-git-send-email-dingel@linux.vnet.ibm.com \
--to=dingel@linux.vnet.ibm.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=khlebnikov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).