diff mbox

[6/9] ashmem: Update arguments of shrinker for 2.6.35

Message ID 1323405908-26046-7-git-send-email-john.stultz@linaro.org
State Superseded
Headers show

Commit Message

John Stultz Dec. 9, 2011, 4:45 a.m. UTC
From: Colin Cross <ccross@google.com>

Change-Id: Ie527d18f3352ede06d565826c8d35ded1638203a
Signed-off-by: Colin Cross <ccross@google.com>
CC: Brian Swetland <swetland@google.com>
CC: Colin Cross <ccross@android.com>
CC: Arve Hjønnevåg <arve@android.com>
CC: Dima Zavin <dima@android.com>
CC: Robert Love <rlove@google.com>
CC: Greg KH <greg@kroah.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/staging/android/ashmem.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 5d70fb2..5a27e0d 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -314,7 +314,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;
 
@@ -629,8 +629,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;
 	}