diff options
-rw-r--r-- | mm/memcontrol.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 5ca1dcf77ce9..c6bd28edd533 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -5591,7 +5591,13 @@ static int compare_thresholds(const void *a, const void *b) | |||
5591 | const struct mem_cgroup_threshold *_a = a; | 5591 | const struct mem_cgroup_threshold *_a = a; |
5592 | const struct mem_cgroup_threshold *_b = b; | 5592 | const struct mem_cgroup_threshold *_b = b; |
5593 | 5593 | ||
5594 | return _a->threshold - _b->threshold; | 5594 | if (_a->threshold > _b->threshold) |
5595 | return 1; | ||
5596 | |||
5597 | if (_a->threshold < _b->threshold) | ||
5598 | return -1; | ||
5599 | |||
5600 | return 0; | ||
5595 | } | 5601 | } |
5596 | 5602 | ||
5597 | static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg) | 5603 | static int mem_cgroup_oom_notify_cb(struct mem_cgroup *memcg) |