diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2015-06-24 19:57:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-24 20:49:43 -0400 |
commit | 3f5ab8cfbf15e8e02838ffc3549191351305df0e (patch) | |
tree | d9f2e3695da695bbe11e7741e9cd9fc2d5f4d009 | |
parent | febd5949e134e279bde927353dc705ce41b18e2d (diff) |
mm: oom_kill: remove unnecessary locking in oom_enable()
Setting oom_killer_disabled to false is atomic, there is no need for
further synchronization with ongoing allocations trying to OOM-kill.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/oom_kill.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 2b665da1b3c9..73763e489e86 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -488,9 +488,7 @@ bool oom_killer_disable(void) | |||
488 | */ | 488 | */ |
489 | void oom_killer_enable(void) | 489 | void oom_killer_enable(void) |
490 | { | 490 | { |
491 | down_write(&oom_sem); | ||
492 | oom_killer_disabled = false; | 491 | oom_killer_disabled = false; |
493 | up_write(&oom_sem); | ||
494 | } | 492 | } |
495 | 493 | ||
496 | #define K(x) ((x) << (PAGE_SHIFT-10)) | 494 | #define K(x) ((x) << (PAGE_SHIFT-10)) |