]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - block/blk-cgroup.c
cgroup: unexport cgroup_css()
[mirror_ubuntu-artful-kernel.git] / block / blk-cgroup.c
index 79fd9f4fadb70a610d22a8184d579eade9f40f02..54ad00292edf1b0385b94bfde5e71cb84253ff22 100644 (file)
@@ -437,10 +437,10 @@ struct request_list *__blk_queue_next_rl(struct request_list *rl,
        return &blkg->rl;
 }
 
-static int blkcg_reset_stats(struct cgroup *cgroup, struct cftype *cftype,
-                            u64 val)
+static int blkcg_reset_stats(struct cgroup_subsys_state *css,
+                            struct cftype *cftype, u64 val)
 {
-       struct blkcg *blkcg = cgroup_to_blkcg(cgroup);
+       struct blkcg *blkcg = css_to_blkcg(css);
        struct blkcg_gq *blkg;
        int i;
 
@@ -614,7 +614,7 @@ u64 blkg_stat_recursive_sum(struct blkg_policy_data *pd, int off)
 {
        struct blkcg_policy *pol = blkcg_policy[pd->plid];
        struct blkcg_gq *pos_blkg;
-       struct cgroup *pos_cgrp;
+       struct cgroup_subsys_state *pos_css;
        u64 sum;
 
        lockdep_assert_held(pd->blkg->q->queue_lock);
@@ -622,7 +622,7 @@ u64 blkg_stat_recursive_sum(struct blkg_policy_data *pd, int off)
        sum = blkg_stat_read((void *)pd + off);
 
        rcu_read_lock();
-       blkg_for_each_descendant_pre(pos_blkg, pos_cgrp, pd_to_blkg(pd)) {
+       blkg_for_each_descendant_pre(pos_blkg, pos_css, pd_to_blkg(pd)) {
                struct blkg_policy_data *pos_pd = blkg_to_pd(pos_blkg, pol);
                struct blkg_stat *stat = (void *)pos_pd + off;
 
@@ -649,7 +649,7 @@ struct blkg_rwstat blkg_rwstat_recursive_sum(struct blkg_policy_data *pd,
 {
        struct blkcg_policy *pol = blkcg_policy[pd->plid];
        struct blkcg_gq *pos_blkg;
-       struct cgroup *pos_cgrp;
+       struct cgroup_subsys_state *pos_css;
        struct blkg_rwstat sum;
        int i;
 
@@ -658,7 +658,7 @@ struct blkg_rwstat blkg_rwstat_recursive_sum(struct blkg_policy_data *pd,
        sum = blkg_rwstat_read((void *)pd + off);
 
        rcu_read_lock();
-       blkg_for_each_descendant_pre(pos_blkg, pos_cgrp, pd_to_blkg(pd)) {
+       blkg_for_each_descendant_pre(pos_blkg, pos_css, pd_to_blkg(pd)) {
                struct blkg_policy_data *pos_pd = blkg_to_pd(pos_blkg, pol);
                struct blkg_rwstat *rwstat = (void *)pos_pd + off;
                struct blkg_rwstat tmp;
@@ -891,7 +891,7 @@ static int blkcg_can_attach(struct cgroup_subsys_state *css,
        int ret = 0;
 
        /* task_lock() is needed to avoid races with exit_io_context() */
-       cgroup_taskset_for_each(task, css->cgroup, tset) {
+       cgroup_taskset_for_each(task, css, tset) {
                task_lock(task);
                ioc = task->io_context;
                if (ioc && atomic_read(&ioc->nr_tasks) > 1)
@@ -1128,7 +1128,7 @@ void blkcg_policy_unregister(struct blkcg_policy *pol)
 
        /* kill the intf files first */
        if (pol->cftypes)
-               cgroup_rm_cftypes(&blkio_subsys, pol->cftypes);
+               cgroup_rm_cftypes(pol->cftypes);
 
        /* unregister and update blkgs */
        blkcg_policy[pol->plid] = NULL;