提交 b95ada55 编写于 作者: T Tejun Heo 提交者: Jens Axboe

cfq: don't register propio policy if !CONFIG_CFQ_GROUP_IOSCHED

cfq has been registering zeroed blkio_poilcy_cfq if CFQ_GROUP_IOSCHED
is disabled.  This fortunately doesn't collide with blk-throtl as
BLKIO_POLICY_PROP is zero but is unnecessary and risky.  Just don't
register it if not enabled.
Signed-off-by: NTejun Heo <tj@kernel.org>
Acked-by: NVivek Goyal <vgoyal@redhat.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 32e380ae
......@@ -3878,8 +3878,6 @@ static struct blkio_policy_type blkio_policy_cfq = {
},
.plid = BLKIO_POLICY_PROP,
};
#else
static struct blkio_policy_type blkio_policy_cfq;
#endif
static int __init cfq_init(void)
......@@ -3910,14 +3908,17 @@ static int __init cfq_init(void)
return ret;
}
#ifdef CONFIG_CFQ_GROUP_IOSCHED
blkio_policy_register(&blkio_policy_cfq);
#endif
return 0;
}
static void __exit cfq_exit(void)
{
#ifdef CONFIG_CFQ_GROUP_IOSCHED
blkio_policy_unregister(&blkio_policy_cfq);
#endif
elv_unregister(&iosched_cfq);
kmem_cache_destroy(cfq_pool);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册