Skip to content

Commit ebc4ff6

Browse files
htejunaxboe
authored andcommitted
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 <[email protected]> Reported-by: Dan Carpenter <[email protected]> Fixes: e4a9bde ("blkcg: replace blkcg_policy->cpd_size with ->cpd_alloc/free_fn() methods") Signed-off-by: Jens Axboe <[email protected]>
1 parent 7bf5853 commit ebc4ff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/cfq-iosched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ static struct blkcg_policy_data *cfq_cpd_alloc(gfp_t gfp)
15861586
{
15871587
struct cfq_group_data *cgd;
15881588

1589-
cgd = kzalloc(sizeof(*cgd), GFP_KERNEL);
1589+
cgd = kzalloc(sizeof(*cgd), gfp);
15901590
if (!cgd)
15911591
return NULL;
15921592
return &cgd->cpd;

0 commit comments

Comments
 (0)