summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2013-10-18 10:42:02 -0700
committerJohn Stultz <john.stultz@linaro.org>2013-10-21 10:15:15 -0700
commit840e617735c5d5b748ac2d10c5c67c4b2e217942 (patch)
tree984a53a222cd8e7565827cd05017f8dfa3649699
parentf61d081ac09707ee9c947370fadb71dfc859e77f (diff)
staging: ashmem: Fix ASHMEM_PURGE_ALL_CACHES return valuetracking-linaro-android-3.12-llct-20131022.0
In commit 7dc19d5aff (convert shrinkers to new count/scan API) the return value to PURGE_ALL_CACHES was dropped, causing -EPERM to always be returned. This patch re-adds the ret assignment, setting it to the the ashmem_shrink_count(), which is the lru_count. (Sorry this was missed in the review!) Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Cc: Dave Chinner <dchinner@redhat.com> Cc: Glauber Costa <glommer@openvz.org> Reported-by: YongQin Liu <yongqin.liu@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--drivers/staging/android/ashmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 905ce8e7ecc8..0547e7458f9f 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -705,7 +705,7 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
.gfp_mask = GFP_KERNEL,
.nr_to_scan = LONG_MAX,
};
-
+ ret = ashmem_shrink_count(&ashmem_shrinker, &sc);
nodes_setall(sc.nodes_to_scan);
ashmem_shrink_scan(&ashmem_shrinker, &sc);
}