diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/ksm.c | 2 | ||||
-rw-r--r-- | mm/oom_kill.c | 10 | ||||
-rw-r--r-- | mm/swapfile.c | 2 |
3 files changed, 7 insertions, 7 deletions
@@ -1919,7 +1919,7 @@ static ssize_t run_store(struct kobject *kobj, struct kobj_attribute *attr, | |||
1919 | if (ksm_run != flags) { | 1919 | if (ksm_run != flags) { |
1920 | ksm_run = flags; | 1920 | ksm_run = flags; |
1921 | if (flags & KSM_RUN_UNMERGE) { | 1921 | if (flags & KSM_RUN_UNMERGE) { |
1922 | int oom_score_adj; | 1922 | short oom_score_adj; |
1923 | 1923 | ||
1924 | oom_score_adj = test_set_oom_score_adj(OOM_SCORE_ADJ_MAX); | 1924 | oom_score_adj = test_set_oom_score_adj(OOM_SCORE_ADJ_MAX); |
1925 | err = unmerge_and_remove_all_rmap_items(); | 1925 | err = unmerge_and_remove_all_rmap_items(); |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 7e9e9113bd05..37ab4c5ab6e8 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -53,7 +53,7 @@ static DEFINE_SPINLOCK(zone_scan_lock); | |||
53 | * @old_val. Usually used to reinstate a previous value to prevent racing with | 53 | * @old_val. Usually used to reinstate a previous value to prevent racing with |
54 | * userspacing tuning the value in the interim. | 54 | * userspacing tuning the value in the interim. |
55 | */ | 55 | */ |
56 | void compare_swap_oom_score_adj(int old_val, int new_val) | 56 | void compare_swap_oom_score_adj(short old_val, short new_val) |
57 | { | 57 | { |
58 | struct sighand_struct *sighand = current->sighand; | 58 | struct sighand_struct *sighand = current->sighand; |
59 | 59 | ||
@@ -72,7 +72,7 @@ void compare_swap_oom_score_adj(int old_val, int new_val) | |||
72 | * synchronization and returns the old value. Usually used to temporarily | 72 | * synchronization and returns the old value. Usually used to temporarily |
73 | * set a value, save the old value in the caller, and then reinstate it later. | 73 | * set a value, save the old value in the caller, and then reinstate it later. |
74 | */ | 74 | */ |
75 | int test_set_oom_score_adj(int new_val) | 75 | short test_set_oom_score_adj(short new_val) |
76 | { | 76 | { |
77 | struct sighand_struct *sighand = current->sighand; | 77 | struct sighand_struct *sighand = current->sighand; |
78 | int old_val; | 78 | int old_val; |
@@ -193,7 +193,7 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg, | |||
193 | if (!p) | 193 | if (!p) |
194 | return 0; | 194 | return 0; |
195 | 195 | ||
196 | adj = p->signal->oom_score_adj; | 196 | adj = (long)p->signal->oom_score_adj; |
197 | if (adj == OOM_SCORE_ADJ_MIN) { | 197 | if (adj == OOM_SCORE_ADJ_MIN) { |
198 | task_unlock(p); | 198 | task_unlock(p); |
199 | return 0; | 199 | return 0; |
@@ -399,7 +399,7 @@ static void dump_tasks(const struct mem_cgroup *memcg, const nodemask_t *nodemas | |||
399 | continue; | 399 | continue; |
400 | } | 400 | } |
401 | 401 | ||
402 | pr_info("[%5d] %5d %5d %8lu %8lu %7lu %8lu %5d %s\n", | 402 | pr_info("[%5d] %5d %5d %8lu %8lu %7lu %8lu %5hd %s\n", |
403 | task->pid, from_kuid(&init_user_ns, task_uid(task)), | 403 | task->pid, from_kuid(&init_user_ns, task_uid(task)), |
404 | task->tgid, task->mm->total_vm, get_mm_rss(task->mm), | 404 | task->tgid, task->mm->total_vm, get_mm_rss(task->mm), |
405 | task->mm->nr_ptes, | 405 | task->mm->nr_ptes, |
@@ -415,7 +415,7 @@ static void dump_header(struct task_struct *p, gfp_t gfp_mask, int order, | |||
415 | { | 415 | { |
416 | task_lock(current); | 416 | task_lock(current); |
417 | pr_warning("%s invoked oom-killer: gfp_mask=0x%x, order=%d, " | 417 | pr_warning("%s invoked oom-killer: gfp_mask=0x%x, order=%d, " |
418 | "oom_score_adj=%d\n", | 418 | "oom_score_adj=%hd\n", |
419 | current->comm, gfp_mask, order, | 419 | current->comm, gfp_mask, order, |
420 | current->signal->oom_score_adj); | 420 | current->signal->oom_score_adj); |
421 | cpuset_print_task_mems_allowed(current); | 421 | cpuset_print_task_mems_allowed(current); |
diff --git a/mm/swapfile.c b/mm/swapfile.c index 0fbb45283c66..bb6f6a04e92d 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1498,7 +1498,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) | |||
1498 | struct address_space *mapping; | 1498 | struct address_space *mapping; |
1499 | struct inode *inode; | 1499 | struct inode *inode; |
1500 | struct filename *pathname; | 1500 | struct filename *pathname; |
1501 | int oom_score_adj; | 1501 | short oom_score_adj; |
1502 | int i, type, prev; | 1502 | int i, type, prev; |
1503 | int err; | 1503 | int err; |
1504 | 1504 | ||