From patchwork Fri Dec 16 02:51:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 5799 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id EBB0623E0E for ; Fri, 16 Dec 2011 02:51:43 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id E2964A182BE for ; Fri, 16 Dec 2011 02:51:43 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id k10so3114749eaa.11 for ; Thu, 15 Dec 2011 18:51:43 -0800 (PST) Received: by 10.205.129.137 with SMTP id hi9mr2589484bkc.90.1324003903762; Thu, 15 Dec 2011 18:51:43 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.129.2 with SMTP id hg2cs59562bkc; Thu, 15 Dec 2011 18:51:43 -0800 (PST) Received: by 10.68.72.70 with SMTP id b6mr13196780pbv.58.1324003902312; Thu, 15 Dec 2011 18:51:42 -0800 (PST) Received: from e38.co.us.ibm.com (e38.co.us.ibm.com. [32.97.110.159]) by mx.google.com with ESMTPS id k1si12471334pbh.97.2011.12.15.18.51.41 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Dec 2011 18:51:42 -0800 (PST) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.159 as permitted sender) client-ip=32.97.110.159; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.159 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Dec 2011 19:51:40 -0700 Received: from d03relay01.boulder.ibm.com (9.17.195.226) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 15 Dec 2011 19:51:18 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBG2pHTC128242; Thu, 15 Dec 2011 19:51:17 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBG2pEx4001935; Thu, 15 Dec 2011 19:51:16 -0700 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pBG2pDgJ001857; Thu, 15 Dec 2011 19:51:14 -0700 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 55E0B1E7501; Thu, 15 Dec 2011 18:51:12 -0800 (PST) From: John Stultz To: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Cc: Colin Cross , Brian Swetland , Colin Cross , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Dima Zavin , Robert Love , Greg KH , John Stultz Subject: [PATCH 06/10] ashmem: Update arguments of shrinker for 2.6.35 Date: Thu, 15 Dec 2011 18:51:00 -0800 Message-Id: <1324003864-26776-7-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1324003864-26776-1-git-send-email-john.stultz@linaro.org> References: <1324003864-26776-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 x-cbid: 11121602-5518-0000-0000-000001067311 From: Colin Cross Change-Id: Ie527d18f3352ede06d565826c8d35ded1638203a Signed-off-by: Colin Cross CC: Brian Swetland CC: Colin Cross CC: Arve Hjønnevåg CC: Dima Zavin CC: Robert Love CC: Greg KH Signed-off-by: John Stultz --- drivers/staging/android/ashmem.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 0b923b0..40c3dc8 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -319,7 +319,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; @@ -634,8 +634,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; }