From patchwork Wed Dec 21 00:49:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 5911 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 D142F23E03 for ; Wed, 21 Dec 2011 00:50:10 +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 C1758A1829C for ; Wed, 21 Dec 2011 00:50:10 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id c11so4023605eaa.11 for ; Tue, 20 Dec 2011 16:50:10 -0800 (PST) Received: by 10.205.138.136 with SMTP id is8mr1533415bkc.35.1324428610576; Tue, 20 Dec 2011 16:50:10 -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.82.144 with SMTP id ac16cs26515bkc; Tue, 20 Dec 2011 16:50:10 -0800 (PST) Received: by 10.68.191.2 with SMTP id gu2mr7480188pbc.39.1324428608029; Tue, 20 Dec 2011 16:50:08 -0800 (PST) Received: from e8.ny.us.ibm.com (e8.ny.us.ibm.com. [32.97.182.138]) by mx.google.com with ESMTPS id e10si4165073pbv.10.2011.12.20.16.50.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Dec 2011 16:50:08 -0800 (PST) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.138 as permitted sender) client-ip=32.97.182.138; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.182.138 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Dec 2011 19:50:06 -0500 Received: from d01relay01.pok.ibm.com (9.56.227.233) by e8.ny.us.ibm.com (192.168.1.108) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 20 Dec 2011 19:50:04 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBL0o3jW213924; Tue, 20 Dec 2011 19:50:03 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBL0o27f007164; Tue, 20 Dec 2011 19:50:02 -0500 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pBL0o1NY007116; Tue, 20 Dec 2011 19:50:01 -0500 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 165F71E74FF; Tue, 20 Dec 2011 16:50:01 -0800 (PST) From: John Stultz To: Greg KH 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 4/7] ashmem: Update arguments of shrinker for 2.6.35 Date: Tue, 20 Dec 2011 16:49:51 -0800 Message-Id: <1324428595-9253-5-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1324428595-9253-1-git-send-email-john.stultz@linaro.org> References: <1324428595-9253-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 x-cbid: 11122100-9360-0000-0000-000001B7A90F 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; }