All ->pre_destory() implementations return 0 now, which is the only
allowed return value. Make it return void.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizefan@huawei.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
*
* This is the blkcg counterpart of ioc_release_fn().
*/
*
* This is the blkcg counterpart of ioc_release_fn().
*/
-static int blkcg_pre_destroy(struct cgroup *cgroup)
+static void blkcg_pre_destroy(struct cgroup *cgroup)
{
struct blkcg *blkcg = cgroup_to_blkcg(cgroup);
{
struct blkcg *blkcg = cgroup_to_blkcg(cgroup);
}
spin_unlock_irq(&blkcg->lock);
}
spin_unlock_irq(&blkcg->lock);
}
static void blkcg_destroy(struct cgroup *cgroup)
}
static void blkcg_destroy(struct cgroup *cgroup)
struct cgroup_subsys {
struct cgroup_subsys_state *(*create)(struct cgroup *cgrp);
struct cgroup_subsys {
struct cgroup_subsys_state *(*create)(struct cgroup *cgrp);
- int (*pre_destroy)(struct cgroup *cgrp);
+ void (*pre_destroy)(struct cgroup *cgrp);
void (*destroy)(struct cgroup *cgrp);
int (*can_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
void (*cancel_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
void (*destroy)(struct cgroup *cgrp);
int (*can_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
void (*cancel_attach)(struct cgroup *cgrp, struct cgroup_taskset *tset);
mutex_unlock(&cgroup_mutex);
for_each_subsys(cgrp->root, ss)
if (ss->pre_destroy)
mutex_unlock(&cgroup_mutex);
for_each_subsys(cgrp->root, ss)
if (ss->pre_destroy)
- WARN_ON_ONCE(ss->pre_destroy(cgrp));
mutex_lock(&cgroup_mutex);
/*
mutex_lock(&cgroup_mutex);
/*
* Force the hugetlb cgroup to empty the hugetlb resources by moving them to
* the parent cgroup.
*/
* Force the hugetlb cgroup to empty the hugetlb resources by moving them to
* the parent cgroup.
*/
-static int hugetlb_cgroup_pre_destroy(struct cgroup *cgroup)
+static void hugetlb_cgroup_pre_destroy(struct cgroup *cgroup)
{
struct hstate *h;
struct page *page;
{
struct hstate *h;
struct page *page;
}
cond_resched();
} while (hugetlb_cgroup_have_usage(cgroup));
}
cond_resched();
} while (hugetlb_cgroup_have_usage(cgroup));
}
int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
}
int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
-static int mem_cgroup_pre_destroy(struct cgroup *cont)
+static void mem_cgroup_pre_destroy(struct cgroup *cont)
{
struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
mem_cgroup_reparent_charges(memcg);
{
struct mem_cgroup *memcg = mem_cgroup_from_cont(cont);
mem_cgroup_reparent_charges(memcg);
}
static void mem_cgroup_destroy(struct cgroup *cont)
}
static void mem_cgroup_destroy(struct cgroup *cont)