diff options
author | Tejun Heo <tj@kernel.org> | 2016-11-10 11:16:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-19 14:18:07 -0500 |
commit | f57d8710096d9f95ed4fd5bb80a6dc5865e4ea7c (patch) | |
tree | 6142fc82400692b3464aae090837730c181e063f | |
parent | f99694cdaf7667c737a6ffa14609a4e880647dcd (diff) |
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: e4a9bde9589f ("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>
-rw-r--r-- | block/cfq-iosched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 5e24d880306c..3ab6807773ee 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) | |||
1596 | { | 1596 | { |
1597 | struct cfq_group_data *cgd; | 1597 | struct cfq_group_data *cgd; |
1598 | 1598 | ||
1599 | cgd = kzalloc(sizeof(*cgd), GFP_KERNEL); | 1599 | cgd = kzalloc(sizeof(*cgd), gfp); |
1600 | if (!cgd) | 1600 | if (!cgd) |
1601 | return NULL; | 1601 | return NULL; |
1602 | return &cgd->cpd; | 1602 | return &cgd->cpd; |