static int cgrp_css_online(struct cgroup *cgrp) { if (cgrp->parent) cgrp_cls_state(cgrp)->classid = cgrp_cls_state(cgrp->parent)->classid; return 0; }
static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp) { struct cgroup_cls_state *cs; cs = kzalloc(sizeof(*cs), GFP_KERNEL); if (!cs) return ERR_PTR(-ENOMEM); if (cgrp->parent) cs->classid = cgrp_cls_state(cgrp->parent)->classid; return &cs->css; }
static void cgrp_css_free(struct cgroup *cgrp) { kfree(cgrp_cls_state(cgrp)); }
static int write_classid(struct cgroup *cgrp, struct cftype *cft, u64 value) { cgrp_cls_state(cgrp)->classid = (u32) value; return 0; }
static u64 read_classid(struct cgroup *cgrp, struct cftype *cft) { return cgrp_cls_state(cgrp)->classid; }
static void cgrp_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) { kfree(cgrp_cls_state(cgrp)); }