aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 5b52011e3a40..ab7a9e6a9b1c 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1014,10 +1014,9 @@ void cfq_update_blkio_group_weight(void *key, struct blkio_group *blkg,
1014 cfqg->needs_update = true; 1014 cfqg->needs_update = true;
1015} 1015}
1016 1016
1017static struct cfq_group * 1017static struct cfq_group * cfq_find_alloc_cfqg(struct cfq_data *cfqd,
1018cfq_find_alloc_cfqg(struct cfq_data *cfqd, struct cgroup *cgroup, int create) 1018 struct blkio_cgroup *blkcg, int create)
1019{ 1019{
1020 struct blkio_cgroup *blkcg = cgroup_to_blkio_cgroup(cgroup);
1021 struct cfq_group *cfqg = NULL; 1020 struct cfq_group *cfqg = NULL;
1022 void *key = cfqd; 1021 void *key = cfqd;
1023 int i, j; 1022 int i, j;
@@ -1079,12 +1078,12 @@ done:
1079 */ 1078 */
1080static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd, int create) 1079static struct cfq_group *cfq_get_cfqg(struct cfq_data *cfqd, int create)
1081{ 1080{
1082 struct cgroup *cgroup; 1081 struct blkio_cgroup *blkcg;
1083 struct cfq_group *cfqg = NULL; 1082 struct cfq_group *cfqg = NULL;
1084 1083
1085 rcu_read_lock(); 1084 rcu_read_lock();
1086 cgroup = task_cgroup(current, blkio_subsys_id); 1085 blkcg = task_blkio_cgroup(current);
1087 cfqg = cfq_find_alloc_cfqg(cfqd, cgroup, create); 1086 cfqg = cfq_find_alloc_cfqg(cfqd, blkcg, create);
1088 if (!cfqg && create) 1087 if (!cfqg && create)
1089 cfqg = &cfqd->root_group; 1088 cfqg = &cfqd->root_group;
1090 rcu_read_unlock(); 1089 rcu_read_unlock();