mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
block: cfq_cpd_alloc() should use @gfp
commitebc4ff661fupstream. 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:e4a9bde958("blkcg: replace blkcg_policy->cpd_size with ->cpd_alloc/free_fn() methods") Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f99694cdaf
commit
f57d871009
@@ -1596,7 +1596,7 @@ static struct blkcg_policy_data *cfq_cpd_alloc(gfp_t gfp)
|
|||||||
{
|
{
|
||||||
struct cfq_group_data *cgd;
|
struct cfq_group_data *cgd;
|
||||||
|
|
||||||
cgd = kzalloc(sizeof(*cgd), GFP_KERNEL);
|
cgd = kzalloc(sizeof(*cgd), gfp);
|
||||||
if (!cgd)
|
if (!cgd)
|
||||||
return NULL;
|
return NULL;
|
||||||
return &cgd->cpd;
|
return &cgd->cpd;
|
||||||
|
|||||||
Reference in New Issue
Block a user