Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp65531ima; Thu, 31 Jan 2019 23:05:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN5iPAAQSNT2M2oac6Mz/kQIom98Iva3smpyaaMwmQnL3SBA9WRAB3taZjLb9rl72y29tWZe X-Received: by 2002:a62:5797:: with SMTP id i23mr25327016pfj.162.1549004726924; Thu, 31 Jan 2019 23:05:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549004726; cv=none; d=google.com; s=arc-20160816; b=daX/JOHr45AsVQ3tgxU9WAjtHJALAhv1tKOlY4yrWjaQJ7JyNvJ40vpU9zY0hmsyfZ lSGb+reULeB6PDmSjnVUNEb0WWOzYe9BV0iAplqZZqMatVQEvbDxHzmZToVLy/3n/X28 V3C7WvwOHDQl847ADLzs/th7JSBqqQV9ne2VY6GqF9k16KUfIxA7VEysGKQ9u4VsOEHM 8w8ZvtiXUhK5HW379VJW1CM3onWSy7oiABQHM0qclYEKyH2TRyKlUqbkKM6XQ215KoT8 6rJipABbwUuXEzjb4Ng1H5O6HvDXJ6+YrHTvLVbNvw4nvJXgEyUMF5UHHa9vU1LH+CaD 3zLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=elTzg4TYucB3PMmmoGopADFKFm5kixdKTRF4xU0M4Ds=; b=MJhc8hhCslxLeFYdNlpaACGx4wP+rXbGLz0JUln+3fsGnhWBFWaD0CZdreh87qQI8+ cAmlqCuUwFcHefTP1k2PM6/xhZUlUS9eKElvS7bOSg6hqZ1WiKrFMGwvqbJ1m+1Uw1QF FEytenPNV5E/Fqe+VoGS5EYjgaYKO7plvqNqGRj3IwW5btAH9EIzeh8jnzzACwzTThit OtegnFAHy0qppdaTK6VoPgAG/z1lHmJTlgLpRK7c1+KcmyotjRHfoIxXdtJoxhQKCU75 /J9uVc5dCLUc+ON7ytoVcMNyswuLm4VZTMlyP949HyAUnFYyy9Km2JEgQX6R1or4ZEPR IPvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v141si7681466pfc.260.2019.01.31.23.05.11; Thu, 31 Jan 2019 23:05:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726421AbfBAG77 (ORCPT + 99 others); Fri, 1 Feb 2019 01:59:59 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:50292 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725763AbfBAG77 (ORCPT ); Fri, 1 Feb 2019 01:59:59 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3AEC679FD9DA40BD5BD1; Fri, 1 Feb 2019 14:59:57 +0800 (CST) Received: from huawei.com (10.141.125.218) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Fri, 1 Feb 2019 14:59:46 +0800 From: Qing Xia To: , , , , , CC: , , , , , , , Subject: [PATCH] staging: android: ion: fix sys heap pool's gfp_flags Date: Fri, 1 Feb 2019 14:59:46 +0800 Message-ID: <1549004386-38778-1-git-send-email-saberlily.xia@hisilicon.com> X-Mailer: git-send-email 2.7.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.141.125.218] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the first loop, gfp_flags will be modified to high_order_gfp_flags, and there will be no chance to change back to low_order_gfp_flags. Fixes: e7f63771 ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc") Signed-off-by: Qing Xia --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index 0383f75..20f2103 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -223,10 +223,10 @@ static void ion_system_heap_destroy_pools(struct ion_page_pool **pools) static int ion_system_heap_create_pools(struct ion_page_pool **pools) { int i; - gfp_t gfp_flags = low_order_gfp_flags; for (i = 0; i < NUM_ORDERS; i++) { struct ion_page_pool *pool; + gfp_t gfp_flags = low_order_gfp_flags; if (orders[i] > 4) gfp_flags = high_order_gfp_flags; -- 2.7.3