From: Tejun Heo Date: Thu, 10 Nov 2016 16:16:37 +0000 (-0500) Subject: block: cfq_cpd_alloc() should use @gfp X-Git-Tag: Ubuntu-5.13.0-19.19~14485^2~96 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ebc4ff661fbe76781c6b16dfb7b754a5d5073f8e;p=mirror_ubuntu-jammy-kernel.git block: cfq_cpd_alloc() should use @gfp 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") Signed-off-by: Jens Axboe --- diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index dcbed8c9c82c..61010511c5a0 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1586,7 +1586,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;