Loading fs/namespace.c +1 −1 Original line number Diff line number Diff line Loading @@ -6015,7 +6015,7 @@ struct mnt_namespace init_mnt_ns = { .ns.inum = PROC_MNT_INIT_INO, .ns.ops = &mntns_operations, .user_ns = &init_user_ns, .ns.count = REFCOUNT_INIT(1), .ns.__ns_ref = REFCOUNT_INIT(1), .passive = REFCOUNT_INIT(1), .mounts = RB_ROOT, .poll = __WAIT_QUEUE_HEAD_INITIALIZER(init_mnt_ns.poll), Loading include/linux/ns_common.h +6 −6 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ struct ns_common { struct dentry *stashed; const struct proc_ns_operations *ops; unsigned int inum; refcount_t count; refcount_t __ns_ref; /* do not use directly */ union { struct { u64 ns_id; Loading Loading @@ -93,19 +93,19 @@ void __ns_common_free(struct ns_common *ns); static __always_inline __must_check bool __ns_ref_put(struct ns_common *ns) { return refcount_dec_and_test(&ns->count); return refcount_dec_and_test(&ns->__ns_ref); } static __always_inline __must_check bool __ns_ref_get(struct ns_common *ns) { return refcount_inc_not_zero(&ns->count); return refcount_inc_not_zero(&ns->__ns_ref); } #define ns_ref_read(__ns) refcount_read(&to_ns_common((__ns))->count) #define ns_ref_inc(__ns) refcount_inc(&to_ns_common((__ns))->count) #define ns_ref_read(__ns) refcount_read(&to_ns_common((__ns))->__ns_ref) #define ns_ref_inc(__ns) refcount_inc(&to_ns_common((__ns))->__ns_ref) #define ns_ref_get(__ns) __ns_ref_get(to_ns_common((__ns))) #define ns_ref_put(__ns) __ns_ref_put(to_ns_common((__ns))) #define ns_ref_put_and_lock(__ns, __lock) \ refcount_dec_and_lock(&to_ns_common((__ns))->count, (__lock)) refcount_dec_and_lock(&to_ns_common((__ns))->__ns_ref, (__lock)) #endif init/version-timestamp.c +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ #include <linux/utsname.h> struct uts_namespace init_uts_ns = { .ns.count = REFCOUNT_INIT(2), .ns.__ns_ref = REFCOUNT_INIT(2), .name = { .sysname = UTS_SYSNAME, .nodename = UTS_NODENAME, Loading ipc/msgutil.c +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ DEFINE_SPINLOCK(mq_lock); * and not CONFIG_IPC_NS. */ struct ipc_namespace init_ipc_ns = { .ns.count = REFCOUNT_INIT(1), .ns.__ns_ref = REFCOUNT_INIT(1), .user_ns = &init_user_ns, .ns.inum = PROC_IPC_INIT_INO, #ifdef CONFIG_IPC_NS Loading kernel/cgroup/cgroup.c +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ static bool have_favordynmods __ro_after_init = IS_ENABLED(CONFIG_CGROUP_FAVOR_D /* cgroup namespace for init task */ struct cgroup_namespace init_cgroup_ns = { .ns.count = REFCOUNT_INIT(2), .ns.__ns_ref = REFCOUNT_INIT(2), .user_ns = &init_user_ns, .ns.ops = &cgroupns_operations, .ns.inum = PROC_CGROUP_INIT_INO, Loading Loading
fs/namespace.c +1 −1 Original line number Diff line number Diff line Loading @@ -6015,7 +6015,7 @@ struct mnt_namespace init_mnt_ns = { .ns.inum = PROC_MNT_INIT_INO, .ns.ops = &mntns_operations, .user_ns = &init_user_ns, .ns.count = REFCOUNT_INIT(1), .ns.__ns_ref = REFCOUNT_INIT(1), .passive = REFCOUNT_INIT(1), .mounts = RB_ROOT, .poll = __WAIT_QUEUE_HEAD_INITIALIZER(init_mnt_ns.poll), Loading
include/linux/ns_common.h +6 −6 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ struct ns_common { struct dentry *stashed; const struct proc_ns_operations *ops; unsigned int inum; refcount_t count; refcount_t __ns_ref; /* do not use directly */ union { struct { u64 ns_id; Loading Loading @@ -93,19 +93,19 @@ void __ns_common_free(struct ns_common *ns); static __always_inline __must_check bool __ns_ref_put(struct ns_common *ns) { return refcount_dec_and_test(&ns->count); return refcount_dec_and_test(&ns->__ns_ref); } static __always_inline __must_check bool __ns_ref_get(struct ns_common *ns) { return refcount_inc_not_zero(&ns->count); return refcount_inc_not_zero(&ns->__ns_ref); } #define ns_ref_read(__ns) refcount_read(&to_ns_common((__ns))->count) #define ns_ref_inc(__ns) refcount_inc(&to_ns_common((__ns))->count) #define ns_ref_read(__ns) refcount_read(&to_ns_common((__ns))->__ns_ref) #define ns_ref_inc(__ns) refcount_inc(&to_ns_common((__ns))->__ns_ref) #define ns_ref_get(__ns) __ns_ref_get(to_ns_common((__ns))) #define ns_ref_put(__ns) __ns_ref_put(to_ns_common((__ns))) #define ns_ref_put_and_lock(__ns, __lock) \ refcount_dec_and_lock(&to_ns_common((__ns))->count, (__lock)) refcount_dec_and_lock(&to_ns_common((__ns))->__ns_ref, (__lock)) #endif
init/version-timestamp.c +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ #include <linux/utsname.h> struct uts_namespace init_uts_ns = { .ns.count = REFCOUNT_INIT(2), .ns.__ns_ref = REFCOUNT_INIT(2), .name = { .sysname = UTS_SYSNAME, .nodename = UTS_NODENAME, Loading
ipc/msgutil.c +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ DEFINE_SPINLOCK(mq_lock); * and not CONFIG_IPC_NS. */ struct ipc_namespace init_ipc_ns = { .ns.count = REFCOUNT_INIT(1), .ns.__ns_ref = REFCOUNT_INIT(1), .user_ns = &init_user_ns, .ns.inum = PROC_IPC_INIT_INO, #ifdef CONFIG_IPC_NS Loading
kernel/cgroup/cgroup.c +1 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,7 @@ static bool have_favordynmods __ro_after_init = IS_ENABLED(CONFIG_CGROUP_FAVOR_D /* cgroup namespace for init task */ struct cgroup_namespace init_cgroup_ns = { .ns.count = REFCOUNT_INIT(2), .ns.__ns_ref = REFCOUNT_INIT(2), .user_ns = &init_user_ns, .ns.ops = &cgroupns_operations, .ns.inum = PROC_CGROUP_INIT_INO, Loading