Skip to contentSkip to conversation

kernel/pid.c: Moving statement.

PATCH In review Raphael S. Carvalho 2 participants 2 messages Jun 10, 2013 – Jun 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/pid.c: Moving statement.

Moving statement to static initilization of init_pid_ns.

---
 kernel/pid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/pid.c +1 -1
index 0db3e79..c577d3c 100644
@@ -75,6 +75,7 @@ struct pid_namespace init_pid_ns = {
 		[ 0 ... PIDMAP_ENTRIES-1] = { ATOMIC_INIT(BITS_PER_PAGE), NULL }
 	},
 	.last_pid = 0,
+	.nr_hashed = PIDNS_HASH_ADDING,
 	.level = 0,
 	.child_reaper = &init_task,
 	.user_ns = &init_user_ns,
@@ -594,7 +595,6 @@ void __init pidmap_init(void)
 	/* Reserve PID 0. We never call free_pidmap(0) */
 	set_bit(0, init_pid_ns.pidmap[0].page);
 	atomic_dec(&init_pid_ns.pidmap[0].nr_free);
-	init_pid_ns.nr_hashed = PIDNS_HASH_ADDING;
 
 	init_pid_ns.pid_cachep = KMEM_CACHE(pid,
 			SLAB_HWCACHE_ALIGN | SLAB_PANIC);
Signature · 1 line
1.7.2.5
Acked-by Serge Hallyn on v1 1/1
#1 lore raw
Quoted 3 lines · Raphael S. Carvalho

Moving statement to static initilization of init_pid_ns.

This seems innocuous enough.

Quoted 26 lines
---
 kernel/pid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/pid.c +1 -1
index 0db3e79..c577d3c 100644
@@ -75,6 +75,7 @@ struct pid_namespace init_pid_ns = {
 		[ 0 ... PIDMAP_ENTRIES-1] = { ATOMIC_INIT(BITS_PER_PAGE), NULL }
 	},
 	.last_pid = 0,
+	.nr_hashed = PIDNS_HASH_ADDING,
 	.level = 0,
 	.child_reaper = &init_task,
 	.user_ns = &init_user_ns,
@@ -594,7 +595,6 @@ void __init pidmap_init(void)
 	/* Reserve PID 0. We never call free_pidmap(0) */
 	set_bit(0, init_pid_ns.pidmap[0].page);
 	atomic_dec(&init_pid_ns.pidmap[0].nr_free);
-	init_pid_ns.nr_hashed = PIDNS_HASH_ADDING;
 
 	init_pid_ns.pid_cachep = KMEM_CACHE(pid,
 			SLAB_HWCACHE_ALIGN | SLAB_PANIC);
Signature · 1 line
1.7.2.5