Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934765AbcKJQQl (ORCPT ); Thu, 10 Nov 2016 11:16:41 -0500 Received: from mail-yw0-f194.google.com ([209.85.161.194]:33908 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934058AbcKJQQj (ORCPT ); Thu, 10 Nov 2016 11:16:39 -0500 Date: Thu, 10 Nov 2016 11:16:37 -0500 From: Tejun Heo To: Jens Axboe Cc: linux-block@vger.kernel.org, Dan Carpenter , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [PATCH] block: cfq_cpd_alloc() should use @gfp Message-ID: <20161110161637.GB26105@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1076 Lines: 30 Re: [bug report] blkcg: replace blkcg_policy->cpd_size with ->cpd_alloc/free_fn() methods Reply-To: In-Reply-To: <20161110133426.GA30610@mwanda> cfq_cpd_alloc() which is the cpd_alloc_fn implementation for cfq was incorrectly hard coding GFP_KERNEL instead of using the mask specified through the @gfp parameter. This currently doesn't cause any actual issues because all current callers specify GFP_KERNEL. Fix it. Signed-off-by: Tejun Heo Reported-by: Dan Carpenter Fixes: e4a9bde9589f ("blkcg: replace blkcg_policy->cpd_size with ->cpd_alloc/free_fn() methods") --- block/cfq-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 5e24d88..3ab6807 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1596,7 +1596,7 @@ static struct blkcg_policy_data *cfq_cpd_alloc(gfp_t gfp) { struct cfq_group_data *cgd; - cgd = kzalloc(sizeof(*cgd), GFP_KERNEL); + cgd = kzalloc(sizeof(*cgd), gfp); if (!cgd) return NULL; return &cgd->cpd;