linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: cfq_cpd_alloc() should use @gfp
@ 2016-11-10 16:16 Tejun Heo
  2016-11-10 17:10 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2016-11-10 16:16 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Dan Carpenter, linux-kernel, kernel-team

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 <tj@kernel.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] block: cfq_cpd_alloc() should use @gfp
  2016-11-10 16:16 [PATCH] block: cfq_cpd_alloc() should use @gfp Tejun Heo
@ 2016-11-10 17:10 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2016-11-10 17:10 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-block, Dan Carpenter, linux-kernel, kernel-team

On 11/10/2016 09:16 AM, Tejun Heo wrote:
> 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.

Thanks Tejun, applied for 4.10.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-10 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10 16:16 [PATCH] block: cfq_cpd_alloc() should use @gfp Tejun Heo
2016-11-10 17:10 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).