Skip to content

Commit 4af7970

Browse files
htejungregkh
authored andcommitted
block: cfq_cpd_alloc() should use @gfp
commit ebc4ff661fbe76781c6b16dfb7b754a5d5073f8e upstream. 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: e4a9bde ("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>
1 parent 2c1dd42 commit 4af7970

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

block/cfq-iosched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ static struct blkcg_policy_data *cfq_cpd_alloc(gfp_t gfp)
15721572
{
15731573
struct cfq_group_data *cgd;
15741574

1575-
cgd = kzalloc(sizeof(*cgd), GFP_KERNEL);
1575+
cgd = kzalloc(sizeof(*cgd), gfp);
15761576
if (!cgd)
15771577
return NULL;
15781578
return &cgd->cpd;

0 commit comments

Comments
 (0)