3.12-stable review patch.  If anyone has any objections, please let me know.

------------------

From: John Stultz <john.stu...@linaro.org>

commit 5957324045ba2c127c9401fa3ac61ac52e043ca8 upstream.

Hopefully this isn't too late for 3.12.

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!)

Fixes: 7dc19d5affd7 ("convert shrinkers to new count/scan API")
Cc: Colin Cross <ccr...@android.com>
Cc: Android Kernel Team <kernel-t...@android.com>
Cc: Glauber Costa <glom...@openvz.org>
Reported-by: YongQin Liu <yongqin....@linaro.org>
Signed-off-by: John Stultz <john.stu...@linaro.org>
Acked-by: Dave Chinner <dchin...@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 drivers/staging/android/ashmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -706,7 +706,7 @@ static long ashmem_ioctl(struct file *fi
                                .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);
                }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to