From: Colin Cross Date: Sun, 22 Aug 2010 00:26:52 +0000 (-0700) Subject: ashmem: Update arguments of shrinker for 2.6.35 X-Git-Tag: firefly_0821_release~7613^2~718 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5eb6fdc0c710873d2be76db4965f247f484f531a;p=firefly-linux-kernel-4.4.55.git ashmem: Update arguments of shrinker for 2.6.35 Change-Id: Ie527d18f3352ede06d565826c8d35ded1638203a Signed-off-by: Colin Cross --- diff --git a/mm/ashmem.c b/mm/ashmem.c index 7b75f41a2d40..b6c5e2aeca61 100644 --- a/mm/ashmem.c +++ b/mm/ashmem.c @@ -311,7 +311,7 @@ out: * chunks of ashmem regions LRU-wise one-at-a-time until we hit 'nr_to_scan' * pages freed. */ -static int ashmem_shrink(int nr_to_scan, gfp_t gfp_mask) +static int ashmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) { struct ashmem_range *range, *next; @@ -626,8 +626,8 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case ASHMEM_PURGE_ALL_CACHES: ret = -EPERM; if (capable(CAP_SYS_ADMIN)) { - ret = ashmem_shrink(0, GFP_KERNEL); - ashmem_shrink(ret, GFP_KERNEL); + ret = ashmem_shrink(&ashmem_shrinker, 0, GFP_KERNEL); + ashmem_shrink(&ashmem_shrinker, ret, GFP_KERNEL); } break; }