X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=mm%2Fswapfile.c;h=d537d29e9b7bb5d9364b531e17f972618a5cad4b;hb=19426a8f810752b4218e59b1e2187f33e255f7bc;hp=8c6b3ce38f09aa0e4f824ce3f70e6e9254a87724;hpb=5e58e5283a0a0a99ee970e7e5c80c6541693376e;p=cascardo%2Flinux.git diff --git a/mm/swapfile.c b/mm/swapfile.c index 8c6b3ce38f09..d537d29e9b7b 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -1555,6 +1556,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) struct address_space *mapping; struct inode *inode; char *pathname; + int oom_score_adj; int i, type, prev; int err; @@ -1613,9 +1615,9 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) p->flags &= ~SWP_WRITEOK; spin_unlock(&swap_lock); - current->flags |= PF_OOM_ORIGIN; + oom_score_adj = test_set_oom_score_adj(OOM_SCORE_ADJ_MAX); err = try_to_unuse(type); - current->flags &= ~PF_OOM_ORIGIN; + test_set_oom_score_adj(oom_score_adj); if (err) { /*