From b176dec2d07f39971a746747ce04ec370b2b9d80 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 29 May 2010 10:17:10 +0000 Subject: Revert ABI change needed for BLK_CGROUP which we don't enable svn path=/dists/sid/linux-2.6/; revision=15805 --- ...cgroup-lite-add-cgroup-id-for-blk-cgroups.patch | 143 +++++++++++++++++++++ debian/patches/series/14-extra | 1 + 2 files changed, 144 insertions(+) create mode 100644 debian/patches/features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch create mode 100644 debian/patches/series/14-extra diff --git a/debian/patches/features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch b/debian/patches/features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch new file mode 100644 index 000000000000..3555fdb10bf2 --- /dev/null +++ b/debian/patches/features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch @@ -0,0 +1,143 @@ +From 5b9779dd276987a84110cf3ea1ca6b3b3d81adaf Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Sat, 29 May 2010 04:18:54 +0100 +Subject: [PATCH 2/2] Revert "cgroup-lite: add cgroup-id for blk-cgroups" + +This reverts commit 983bb0952f838b55130f20a9486a04c92ae5826b. +--- + include/linux/cgroup.h | 2 - + kernel/cgroup_lite.c | 77 ------------------------------------------------ + 2 files changed, 0 insertions(+), 79 deletions(-) + +diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h +index fb7d985..0008dee 100644 +--- a/include/linux/cgroup.h ++++ b/include/linux/cgroup.h +@@ -220,8 +220,6 @@ struct cgroup { + + /* For RCU-protected deletion */ + struct rcu_head rcu_head; +- +- int cgroup_lite_id; + }; + + /* +diff --git a/kernel/cgroup_lite.c b/kernel/cgroup_lite.c +index 65575cc..629987f 100644 +--- a/kernel/cgroup_lite.c ++++ b/kernel/cgroup_lite.c +@@ -19,73 +19,6 @@ static struct css_set init_css_set; + static struct cgroup init_cgroup; + static struct cftype *subsys_cftypes[CGROUP_SUBSYS_COUNT]; + +-static struct idr cgroup_idr; +-static DEFINE_SPINLOCK(cgroup_idr_lock); +- +-unsigned short css_id(struct cgroup_subsys_state *css) +-{ +- return css->cgroup->cgroup_lite_id; +-} +- +-unsigned short css_depth(struct cgroup_subsys_state *css) +-{ +- return (css->cgroup == &init_cgroup) ? 0 : 1; +-} +- +-int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen) +-{ +- snprintf(buf, buflen, "/%d", cgrp->cgroup_lite_id); +- return 0; +-} +- +-struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id) +-{ +- struct cgroup *g; +- +- BUG_ON(!ss->use_id); +- g = idr_find(&cgroup_idr, id); +- if (!g) +- return NULL; +- return g->subsys[ss->subsys_id]; +-} +- +-void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) +-{ +-} +- +-static int init_cgroup_id(struct cgroup *g) +-{ +- int err, id; +- +- if (unlikely(!idr_pre_get(&cgroup_idr, GFP_KERNEL))) +- return -ENOMEM; +- +- spin_lock(&cgroup_idr_lock); +- err = idr_get_new_above(&cgroup_idr, g, 1, &id); +- spin_unlock(&cgroup_idr_lock); +- +- if (err) +- return err; +- +- if (id > USHORT_MAX) { +- spin_lock(&cgroup_idr_lock); +- idr_remove(&cgroup_idr, id); +- spin_unlock(&cgroup_idr_lock); +- return -ENOSPC; +- } +- +- g->cgroup_lite_id = id; +- +- return 0; +-} +- +-static void fini_cgroup_id(struct cgroup *g) +-{ +- spin_lock(&cgroup_idr_lock); +- idr_remove(&cgroup_idr, g->cgroup_lite_id); +- spin_unlock(&cgroup_idr_lock); +-} +- + void __css_put(struct cgroup_subsys_state *css) + { + atomic_dec(&css->refcnt); +@@ -134,10 +67,6 @@ int init_ve_cgroups(struct ve_struct *ve) + if (cs == NULL) + goto err_calloc; + +- err = init_cgroup_id(g); +- if (err) +- goto err_id; +- + g->parent = &init_cgroup; + err = init_css_set_subsystems(g, cs); + if (err) +@@ -149,8 +78,6 @@ int init_ve_cgroups(struct ve_struct *ve) + return 0; + + err_subsys: +- fini_cgroup_id(g); +-err_id: + kfree(cs); + err_calloc: + kfree(g); +@@ -181,7 +108,6 @@ void fini_ve_cgroups(struct ve_struct *ve) + cs->destroy(cs, g); + } + +- fini_cgroup_id(g); + kfree(g); + kfree(css); + ve->ve_cgroup = NULL; +@@ -299,9 +225,6 @@ int __init cgroup_init(void) + { + get_ve0()->ve_cgroup = &init_cgroup; + get_ve0()->ve_css_set = &init_css_set; +- idr_init(&cgroup_idr); +- if (init_cgroup_id(&init_cgroup)) +- panic("CG: Can't init initial cgroup id\n"); + if (init_css_set_subsystems(&init_cgroup, &init_css_set) != 0) + panic("CG: Can't init initial set\n"); + return 0; +-- +1.7.1 + diff --git a/debian/patches/series/14-extra b/debian/patches/series/14-extra new file mode 100644 index 000000000000..625c2a7b2e92 --- /dev/null +++ b/debian/patches/series/14-extra @@ -0,0 +1 @@ ++ features/all/openvz/revert-cgroup-lite-add-cgroup-id-for-blk-cgroups.patch featureset=openvz -- cgit v1.2.3