File tree Expand file tree Collapse file tree 9 files changed +14
-14
lines changed
Expand file tree Collapse file tree 9 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -6015,7 +6015,7 @@ struct mnt_namespace init_mnt_ns = {
60156015 .ns .inum = PROC_MNT_INIT_INO ,
60166016 .ns .ops = & mntns_operations ,
60176017 .user_ns = & init_user_ns ,
6018- .ns .count = REFCOUNT_INIT (1 ),
6018+ .ns .__ns_ref = REFCOUNT_INIT (1 ),
60196019 .passive = REFCOUNT_INIT (1 ),
60206020 .mounts = RB_ROOT ,
60216021 .poll = __WAIT_QUEUE_HEAD_INITIALIZER (init_mnt_ns .poll ),
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ struct ns_common {
2929 struct dentry * stashed ;
3030 const struct proc_ns_operations * ops ;
3131 unsigned int inum ;
32- refcount_t count ;
32+ refcount_t __ns_ref ; /* do not use directly */
3333 union {
3434 struct {
3535 u64 ns_id ;
@@ -93,19 +93,19 @@ void __ns_common_free(struct ns_common *ns);
9393
9494static __always_inline __must_check bool __ns_ref_put (struct ns_common * ns )
9595{
96- return refcount_dec_and_test (& ns -> count );
96+ return refcount_dec_and_test (& ns -> __ns_ref );
9797}
9898
9999static __always_inline __must_check bool __ns_ref_get (struct ns_common * ns )
100100{
101- return refcount_inc_not_zero (& ns -> count );
101+ return refcount_inc_not_zero (& ns -> __ns_ref );
102102}
103103
104- #define ns_ref_read (__ns ) refcount_read(&to_ns_common((__ns))->count )
105- #define ns_ref_inc (__ns ) refcount_inc(&to_ns_common((__ns))->count )
104+ #define ns_ref_read (__ns ) refcount_read(&to_ns_common((__ns))->__ns_ref )
105+ #define ns_ref_inc (__ns ) refcount_inc(&to_ns_common((__ns))->__ns_ref )
106106#define ns_ref_get (__ns ) __ns_ref_get(to_ns_common((__ns)))
107107#define ns_ref_put (__ns ) __ns_ref_put(to_ns_common((__ns)))
108108#define ns_ref_put_and_lock (__ns , __lock ) \
109- refcount_dec_and_lock(&to_ns_common((__ns))->count , (__lock))
109+ refcount_dec_and_lock(&to_ns_common((__ns))->__ns_ref , (__lock))
110110
111111#endif
Original file line number Diff line number Diff line change 88#include <linux/utsname.h>
99
1010struct uts_namespace init_uts_ns = {
11- .ns .count = REFCOUNT_INIT (2 ),
11+ .ns .__ns_ref = REFCOUNT_INIT (2 ),
1212 .name = {
1313 .sysname = UTS_SYSNAME ,
1414 .nodename = UTS_NODENAME ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ DEFINE_SPINLOCK(mq_lock);
2727 * and not CONFIG_IPC_NS.
2828 */
2929struct ipc_namespace init_ipc_ns = {
30- .ns .count = REFCOUNT_INIT (1 ),
30+ .ns .__ns_ref = REFCOUNT_INIT (1 ),
3131 .user_ns = & init_user_ns ,
3232 .ns .inum = PROC_IPC_INIT_INO ,
3333#ifdef CONFIG_IPC_NS
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ static bool have_favordynmods __ro_after_init = IS_ENABLED(CONFIG_CGROUP_FAVOR_D
219219
220220/* cgroup namespace for init task */
221221struct cgroup_namespace init_cgroup_ns = {
222- .ns .count = REFCOUNT_INIT (2 ),
222+ .ns .__ns_ref = REFCOUNT_INIT (2 ),
223223 .user_ns = & init_user_ns ,
224224 .ns .ops = & cgroupns_operations ,
225225 .ns .inum = PROC_CGROUP_INIT_INO ,
Original file line number Diff line number Diff line change 55
66int __ns_common_init (struct ns_common * ns , const struct proc_ns_operations * ops , int inum )
77{
8- refcount_set (& ns -> count , 1 );
8+ refcount_set (& ns -> __ns_ref , 1 );
99 ns -> stashed = NULL ;
1010 ns -> ops = ops ;
1111 ns -> ns_id = 0 ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ static int pid_max_max = PID_MAX_LIMIT;
7171 * the scheme scales to up to 4 million PIDs, runtime.
7272 */
7373struct pid_namespace init_pid_ns = {
74- .ns .count = REFCOUNT_INIT (2 ),
74+ .ns .__ns_ref = REFCOUNT_INIT (2 ),
7575 .idr = IDR_INIT (init_pid_ns .idr ),
7676 .pid_allocated = PIDNS_ADDING ,
7777 .level = 0 ,
Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ const struct proc_ns_operations timens_for_children_operations = {
480480};
481481
482482struct time_namespace init_time_ns = {
483- .ns .count = REFCOUNT_INIT (3 ),
483+ .ns .__ns_ref = REFCOUNT_INIT (3 ),
484484 .user_ns = & init_user_ns ,
485485 .ns .inum = PROC_TIME_INIT_INO ,
486486 .ns .ops = & timens_operations ,
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ struct user_namespace init_user_ns = {
6565 .nr_extents = 1 ,
6666 },
6767 },
68- .ns .count = REFCOUNT_INIT (3 ),
68+ .ns .__ns_ref = REFCOUNT_INIT (3 ),
6969 .owner = GLOBAL_ROOT_UID ,
7070 .group = GLOBAL_ROOT_GID ,
7171 .ns .inum = PROC_USER_INIT_INO ,
You can’t perform that action at this time.
0 commit comments