Skip to contentSkip to conversation

cgroup: fix subsys bitops

PATCH In review Li Zefan 3 participants 3 messages Feb 18, 2008 – Feb 20, 2008 1 message not in the archive

lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 5/7 cgroup: fix subsys bitops

Cgroup uses unsigned long for subsys bitops, not unsigned long long.

---
 kernel/cgroup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/cgroup.c +2 -2
index aa76bbd..e8c8e58 100644
@@ -320,7 +320,7 @@ static struct css_set *find_existing_css_set(
 	/* Built the set of subsystem state objects that we want to
 	 * see in the new css_set */
 	for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
-		if (root->subsys_bits & (1ull << i)) {
+		if (root->subsys_bits & (1UL << i)) {
 			/* Subsystem is in this hierarchy. So we want
 			 * the subsystem state from the new
 			 * cgroup */
@@ -696,7 +696,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
 	added_bits = final_bits & ~root->actual_subsys_bits;
 	/* Check that any added subsystems are currently free */
 	for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
-		unsigned long long bit = 1ull << i;
+		unsigned long bit = 1UL << i;
 		struct cgroup_subsys *ss = subsys[i];
 		if (!(bit & added_bits))
 			continue;
Signature · 1 line
1.5.4.rc3

A message that is not in the archive (sent off-list or not yet received): [email protected]

Acked-by
#2 lore raw
Quoted 3 lines · Li Zefan

Cgroup uses unsigned long for subsys bitops, not unsigned long long.

Quoted 30 lines
---
 kernel/cgroup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/cgroup.c +2 -3
index aa76bbd..e8c8e58 100644
@@ -320,7 +320,7 @@ static struct css_set *find_existing_css_set(
        /* Built the set of subsystem state objects that we want to
         * see in the new css_set */
        for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
-               if (root->subsys_bits & (1ull << i)) {
+               if (root->subsys_bits & (1UL << i)) {
                        /* Subsystem is in this hierarchy. So we want
                         * the subsystem state from the new
                         * cgroup */
@@ -696,7 +696,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
        added_bits = final_bits & ~root->actual_subsys_bits;
        /* Check that any added subsystems are currently free */
        for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
-               unsigned long long bit = 1ull << i;
+               unsigned long bit = 1UL << i;
                struct cgroup_subsys *ss = subsys[i];
                if (!(bit & added_bits))
                        continue;
--

1.5.4.rc3

Acked-by on v1 5/7
#3 lore raw
In reply to Li Zefan
Quoted 3 lines · Li Zefan

Cgroup uses unsigned long for subsys bitops, not unsigned long long.

Quoted 30 lines
---
 kernel/cgroup.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/cgroup.c +2 -3
index aa76bbd..e8c8e58 100644
@@ -320,7 +320,7 @@ static struct css_set *find_existing_css_set(
        /* Built the set of subsystem state objects that we want to
         * see in the new css_set */
        for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
-               if (root->subsys_bits & (1ull << i)) {
+               if (root->subsys_bits & (1UL << i)) {
                        /* Subsystem is in this hierarchy. So we want
                         * the subsystem state from the new
                         * cgroup */
@@ -696,7 +696,7 @@ static int rebind_subsystems(struct cgroupfs_root *root,
        added_bits = final_bits & ~root->actual_subsys_bits;
        /* Check that any added subsystems are currently free */
        for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
-               unsigned long long bit = 1ull << i;
+               unsigned long bit = 1UL << i;
                struct cgroup_subsys *ss = subsys[i];
                if (!(bit & added_bits))
                        continue;
--

1.5.4.rc3