diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:42 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:42 -0400 |
commit | aaec55a002a29bf940588dc03253099a4cd543bf (patch) | |
tree | 2fb146599db30c25abca72e52516d1c5f2c4e21e /block | |
parent | 959d851caa48829eb85cb85aa949fd6b4c5d5bc6 (diff) |
blkcg: remove unused @pol and @plid parameters
@pol to blkg_to_pdata() and @plid to blkg_lookup_create() are no
longer necessary. Drop them.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 3 | ||||
-rw-r--r-- | block/blk-cgroup.h | 8 | ||||
-rw-r--r-- | block/blk-throttle.c | 7 | ||||
-rw-r--r-- | block/cfq-iosched.c | 7 |
4 files changed, 9 insertions, 16 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4fdeb46b4436..55ccbae6c434 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -568,7 +568,6 @@ static struct blkio_group *blkg_alloc(struct blkio_cgroup *blkcg, | |||
568 | 568 | ||
569 | struct blkio_group *blkg_lookup_create(struct blkio_cgroup *blkcg, | 569 | struct blkio_group *blkg_lookup_create(struct blkio_cgroup *blkcg, |
570 | struct request_queue *q, | 570 | struct request_queue *q, |
571 | enum blkio_policy_id plid, | ||
572 | bool for_root) | 571 | bool for_root) |
573 | __releases(q->queue_lock) __acquires(q->queue_lock) | 572 | __releases(q->queue_lock) __acquires(q->queue_lock) |
574 | { | 573 | { |
@@ -1027,7 +1026,7 @@ static int blkio_policy_parse_and_set(char *buf, enum blkio_policy_id plid, | |||
1027 | rcu_read_lock(); | 1026 | rcu_read_lock(); |
1028 | 1027 | ||
1029 | spin_lock_irq(disk->queue->queue_lock); | 1028 | spin_lock_irq(disk->queue->queue_lock); |
1030 | blkg = blkg_lookup_create(blkcg, disk->queue, plid, false); | 1029 | blkg = blkg_lookup_create(blkcg, disk->queue, false); |
1031 | spin_unlock_irq(disk->queue->queue_lock); | 1030 | spin_unlock_irq(disk->queue->queue_lock); |
1032 | 1031 | ||
1033 | if (IS_ERR(blkg)) { | 1032 | if (IS_ERR(blkg)) { |
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 1cb8f7643258..1add3dcfc19d 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -266,13 +266,10 @@ static inline void *blkg_to_pdata(struct blkio_group *blkg, | |||
266 | /** | 266 | /** |
267 | * pdata_to_blkg - get blkg associated with policy private data | 267 | * pdata_to_blkg - get blkg associated with policy private data |
268 | * @pdata: policy private data of interest | 268 | * @pdata: policy private data of interest |
269 | * @pol: policy @pdata is for | ||
270 | * | 269 | * |
271 | * @pdata is policy private data for @pol. Determine the blkg it's | 270 | * @pdata is policy private data. Determine the blkg it's associated with. |
272 | * associated with. | ||
273 | */ | 271 | */ |
274 | static inline struct blkio_group *pdata_to_blkg(void *pdata, | 272 | static inline struct blkio_group *pdata_to_blkg(void *pdata) |
275 | struct blkio_policy_type *pol) | ||
276 | { | 273 | { |
277 | if (pdata) { | 274 | if (pdata) { |
278 | struct blkg_policy_data *pd = | 275 | struct blkg_policy_data *pd = |
@@ -402,7 +399,6 @@ extern struct blkio_group *blkg_lookup(struct blkio_cgroup *blkcg, | |||
402 | struct request_queue *q); | 399 | struct request_queue *q); |
403 | struct blkio_group *blkg_lookup_create(struct blkio_cgroup *blkcg, | 400 | struct blkio_group *blkg_lookup_create(struct blkio_cgroup *blkcg, |
404 | struct request_queue *q, | 401 | struct request_queue *q, |
405 | enum blkio_policy_id plid, | ||
406 | bool for_root); | 402 | bool for_root); |
407 | void blkiocg_update_timeslice_used(struct blkio_group *blkg, | 403 | void blkiocg_update_timeslice_used(struct blkio_group *blkg, |
408 | struct blkio_policy_type *pol, | 404 | struct blkio_policy_type *pol, |
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 4ba141820a2e..1cc6c23de2c1 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -107,7 +107,7 @@ static inline struct throtl_grp *blkg_to_tg(struct blkio_group *blkg) | |||
107 | 107 | ||
108 | static inline struct blkio_group *tg_to_blkg(struct throtl_grp *tg) | 108 | static inline struct blkio_group *tg_to_blkg(struct throtl_grp *tg) |
109 | { | 109 | { |
110 | return pdata_to_blkg(tg, &blkio_policy_throtl); | 110 | return pdata_to_blkg(tg); |
111 | } | 111 | } |
112 | 112 | ||
113 | enum tg_state_flags { | 113 | enum tg_state_flags { |
@@ -185,7 +185,7 @@ static struct throtl_grp *throtl_lookup_create_tg(struct throtl_data *td, | |||
185 | } else { | 185 | } else { |
186 | struct blkio_group *blkg; | 186 | struct blkio_group *blkg; |
187 | 187 | ||
188 | blkg = blkg_lookup_create(blkcg, q, BLKIO_POLICY_THROTL, false); | 188 | blkg = blkg_lookup_create(blkcg, q, false); |
189 | 189 | ||
190 | /* if %NULL and @q is alive, fall back to root_tg */ | 190 | /* if %NULL and @q is alive, fall back to root_tg */ |
191 | if (!IS_ERR(blkg)) | 191 | if (!IS_ERR(blkg)) |
@@ -1033,8 +1033,7 @@ int blk_throtl_init(struct request_queue *q) | |||
1033 | rcu_read_lock(); | 1033 | rcu_read_lock(); |
1034 | spin_lock_irq(q->queue_lock); | 1034 | spin_lock_irq(q->queue_lock); |
1035 | 1035 | ||
1036 | blkg = blkg_lookup_create(&blkio_root_cgroup, q, BLKIO_POLICY_THROTL, | 1036 | blkg = blkg_lookup_create(&blkio_root_cgroup, q, true); |
1037 | true); | ||
1038 | if (!IS_ERR(blkg)) | 1037 | if (!IS_ERR(blkg)) |
1039 | td->root_tg = blkg_to_tg(blkg); | 1038 | td->root_tg = blkg_to_tg(blkg); |
1040 | 1039 | ||
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 39c43307dc6c..8cca6161d0bc 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -374,7 +374,7 @@ static inline struct cfq_group *blkg_to_cfqg(struct blkio_group *blkg) | |||
374 | 374 | ||
375 | static inline struct blkio_group *cfqg_to_blkg(struct cfq_group *cfqg) | 375 | static inline struct blkio_group *cfqg_to_blkg(struct cfq_group *cfqg) |
376 | { | 376 | { |
377 | return pdata_to_blkg(cfqg, &blkio_policy_cfq); | 377 | return pdata_to_blkg(cfqg); |
378 | } | 378 | } |
379 | 379 | ||
380 | static inline void cfqg_get(struct cfq_group *cfqg) | 380 | static inline void cfqg_get(struct cfq_group *cfqg) |
@@ -1092,7 +1092,7 @@ static struct cfq_group *cfq_lookup_create_cfqg(struct cfq_data *cfqd, | |||
1092 | } else { | 1092 | } else { |
1093 | struct blkio_group *blkg; | 1093 | struct blkio_group *blkg; |
1094 | 1094 | ||
1095 | blkg = blkg_lookup_create(blkcg, q, BLKIO_POLICY_PROP, false); | 1095 | blkg = blkg_lookup_create(blkcg, q, false); |
1096 | if (!IS_ERR(blkg)) | 1096 | if (!IS_ERR(blkg)) |
1097 | cfqg = blkg_to_cfqg(blkg); | 1097 | cfqg = blkg_to_cfqg(blkg); |
1098 | } | 1098 | } |
@@ -3523,8 +3523,7 @@ static int cfq_init_queue(struct request_queue *q) | |||
3523 | rcu_read_lock(); | 3523 | rcu_read_lock(); |
3524 | spin_lock_irq(q->queue_lock); | 3524 | spin_lock_irq(q->queue_lock); |
3525 | 3525 | ||
3526 | blkg = blkg_lookup_create(&blkio_root_cgroup, q, BLKIO_POLICY_PROP, | 3526 | blkg = blkg_lookup_create(&blkio_root_cgroup, q, true); |
3527 | true); | ||
3528 | if (!IS_ERR(blkg)) | 3527 | if (!IS_ERR(blkg)) |
3529 | cfqd->root_group = blkg_to_cfqg(blkg); | 3528 | cfqd->root_group = blkg_to_cfqg(blkg); |
3530 | 3529 | ||