Commit fc5b4cfe authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] do_swap_page() return value fix

From: BlaisorBlade <blaisorblade_spam@yahoo.it>

An exhausted do_swap_page() should return VM_FAULT_OOM rather than -ENOMEM.
parent 851c937d
...@@ -1251,7 +1251,7 @@ static int do_swap_page(struct mm_struct * mm, ...@@ -1251,7 +1251,7 @@ static int do_swap_page(struct mm_struct * mm,
mark_page_accessed(page); mark_page_accessed(page);
pte_chain = pte_chain_alloc(GFP_KERNEL); pte_chain = pte_chain_alloc(GFP_KERNEL);
if (!pte_chain) { if (!pte_chain) {
ret = -ENOMEM; ret = VM_FAULT_OOM;
goto out; goto out;
} }
lock_page(page); lock_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment