Message ID | 1382374687-4831-1-git-send-email-john.stultz@linaro.org |
---|---|
State | Accepted |
Commit | 5957324045ba2c127c9401fa3ac61ac52e043ca8 |
Headers | show
Return-Path: <patchwork-forward+bncBCJ7RPMX4EMBBK52SWJQKGQENIFOSLI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B00E5244DE for <linaro@patches.linaro.org>; Mon, 21 Oct 2013 16:58:20 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id gq1sf9191155obb.6 for <linaro@patches.linaro.org>; Mon, 21 Oct 2013 09:58:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=X7A4b0Pew9nVe+2JI2YaJ4Aywc+VCEnAoKB6COU9eDw=; b=h3hw3uZLMBfu/tyJpejhQLrqbBOrrzkgs1m3DhmVv0zD8BDBk57tnUIN1tWczUrSvr 7ZflLPa7sCryDJT15B8zx+651dVU/0Vz45FBQgGtWEyaKHiXjR62ziGnQG+otwqwjPUa ADv+z9hkgRgpjB65N9756BmrLyhG/B8Wp4zB4RqFJYgD/I5LFDVj7+IwOd1c8Df+micE x0ZaDSxd68kGBOoP73jUJOUDZOkky4Acr8KG8JjvR4zn2I1WgP576jLhlno+/krw1aiW 01+G6piP5ZGytN0UqiuqucJNwDKG9Q2GblrQ4gwLcaSIyLMICsCeGY+6eGHD9orLoWui h4Yg== X-Received: by 10.50.114.66 with SMTP id je2mr5543208igb.5.1382374699489; Mon, 21 Oct 2013 09:58:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.233 with SMTP id x9ls2204453qef.46.gmail; Mon, 21 Oct 2013 09:58:19 -0700 (PDT) X-Received: by 10.221.51.206 with SMTP id vj14mr1788884vcb.17.1382374699295; Mon, 21 Oct 2013 09:58:19 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id fx4si4643077vdc.65.2013.10.21.09.58.19 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 09:58:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id pa12so4255655veb.20 for <patchwork-forward@linaro.org>; Mon, 21 Oct 2013 09:58:19 -0700 (PDT) X-Gm-Message-State: ALoCoQnE/KSxN11AQFe6DbYFasi9eHyWxiguoxJZ3upx1O9zf2X3+CoGqC85N71zgD1MdC2m/yEM X-Received: by 10.52.37.69 with SMTP id w5mr472871vdj.32.1382374699084; Mon, 21 Oct 2013 09:58:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp166066vcz; Mon, 21 Oct 2013 09:58:18 -0700 (PDT) X-Received: by 10.66.182.36 with SMTP id eb4mr3795807pac.125.1382374698094; Mon, 21 Oct 2013 09:58:18 -0700 (PDT) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id ei3si9117997pbc.20.2013.10.21.09.58.17 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 09:58:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.43; Received: by mail-pa0-f43.google.com with SMTP id hz1so6686514pad.2 for <patches@linaro.org>; Mon, 21 Oct 2013 09:58:17 -0700 (PDT) X-Received: by 10.66.234.131 with SMTP id ue3mr18526347pac.35.1382374697466; Mon, 21 Oct 2013 09:58:17 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id va8sm22068178pbc.16.2013.10.21.09.58.16 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 09:58:16 -0700 (PDT) From: John Stultz <john.stultz@linaro.org> To: LKML <linux-kernel@vger.kernel.org> Cc: John Stultz <john.stultz@linaro.org>, Greg KH <gregkh@linuxfoundation.org>, Colin Cross <ccross@android.com>, Android Kernel Team <kernel-team@android.com>, Dave Chinner <dchinner@redhat.com>, Glauber Costa <glommer@openvz.org> Subject: [PATCH] staging: ashmem: Fix ASHMEM_PURGE_ALL_CACHES return value Date: Mon, 21 Oct 2013 09:58:07 -0700 Message-Id: <1382374687-4831-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.1.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 8e76ddc..5a5e9c9 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -706,7 +706,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); }
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!) 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> --- drivers/staging/android/ashmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)