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;