diff options
| author | David Rientjes <rientjes@google.com> | 2014-08-06 16:07:52 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-05-02 21:45:15 +0200 |
| commit | 22f0b6a755d8cee9e0cc024ddda83f63255712ac (patch) | |
| tree | c96fd7b36376a5c9ffa502a45009a62f0cf36aa9 /include/linux | |
| parent | c425230953147ffc89f22fc7870da094c5ceeeba (diff) | |
| download | android_kernel_m2note-22f0b6a755d8cee9e0cc024ddda83f63255712ac.tar.gz | |
mm, oom: rename zonelist locking functions
try_set_zonelist_oom() and clear_zonelist_oom() are not named properly
to imply that they require locking semantics to avoid out_of_memory()
being reordered.
zone_scan_lock is required for both functions to ensure that there is
proper locking synchronization.
Rename try_set_zonelist_oom() to oom_zonelist_trylock() and rename
clear_zonelist_oom() to oom_zonelist_unlock() to imply there is proper
locking semantics.
At the same time, convert oom_zonelist_trylock() to return bool instead
of int since only success and failure are tested.
Change-Id: Ide8f1efa2763212ffb2797979582c43251c89697
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/oom.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/oom.h b/include/linux/oom.h index b16a9f5ab..fbb0bead6 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h @@ -58,8 +58,8 @@ extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, struct mem_cgroup *memcg, nodemask_t *nodemask, const char *message); -extern int try_set_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); -extern void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); +extern bool oom_zonelist_trylock(struct zonelist *zonelist, gfp_t gfp_flags); +extern void oom_zonelist_unlock(struct zonelist *zonelist, gfp_t gfp_flags); extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask, int order, const nodemask_t *nodemask); |
