diff options
author | Colin Cross <ccross@android.com> | 2011-06-22 16:05:47 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-30 21:21:10 +0900 |
commit | cae9bf11ef0d92875b222f994a2cfd723991435a (patch) | |
tree | b96981807f5cd8da69b9a689f85e61a319c4deb0 /drivers/staging | |
parent | 71b2c82bdf67ab24716c536e10de436169d3574c (diff) | |
download | op-kernel-dev-cae9bf11ef0d92875b222f994a2cfd723991435a.zip op-kernel-dev-cae9bf11ef0d92875b222f994a2cfd723991435a.tar.gz |
android: lowmemorykiller: Fix arguments to lowmem_shrink
The arguments to shrink functions have changed, update
lowmem_shrink to match.
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/lowmemorykiller.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 0ae08ad..4098bbb 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -79,7 +79,7 @@ task_notify_func(struct notifier_block *self, unsigned long val, void *data) return NOTIFY_OK; } -static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) +static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc) { struct task_struct *p; struct task_struct *selected = NULL; @@ -117,17 +117,17 @@ static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) break; } } - if (nr_to_scan > 0) - lowmem_print(3, "lowmem_shrink %d, %x, ofree %d %d, ma %d\n", - nr_to_scan, gfp_mask, other_free, other_file, + if (sc->nr_to_scan > 0) + lowmem_print(3, "lowmem_shrink %lu, %x, ofree %d %d, ma %d\n", + sc->nr_to_scan, sc->gfp_mask, other_free, other_file, min_adj); rem = global_page_state(NR_ACTIVE_ANON) + global_page_state(NR_ACTIVE_FILE) + global_page_state(NR_INACTIVE_ANON) + global_page_state(NR_INACTIVE_FILE); - if (nr_to_scan <= 0 || min_adj == OOM_ADJUST_MAX + 1) { - lowmem_print(5, "lowmem_shrink %d, %x, return %d\n", - nr_to_scan, gfp_mask, rem); + if (sc->nr_to_scan <= 0 || min_adj == OOM_ADJUST_MAX + 1) { + lowmem_print(5, "lowmem_shrink %lu, %x, return %d\n", + sc->nr_to_scan, sc->gfp_mask, rem); return rem; } selected_oom_adj = min_adj; @@ -183,8 +183,8 @@ static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) force_sig(SIGKILL, selected); rem -= selected_tasksize; } - lowmem_print(4, "lowmem_shrink %d, %x, return %d\n", - nr_to_scan, gfp_mask, rem); + lowmem_print(4, "lowmem_shrink %lu, %x, return %d\n", + sc->nr_to_scan, sc->gfp_mask, rem); read_unlock(&tasklist_lock); return rem; } |