Skip to content

Commit

Permalink
mm/memory.c: remove unused code from do_wp_page()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dominik Dingel authored and Linus Torvalds committed Dec 13, 2012
1 parent 816422a commit 66521d5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2780,13 +2780,8 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
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:
Expand Down

0 comments on commit 66521d5

Please sign in to comment.