diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-11-10 16:08:27 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-11-11 10:01:32 +0100 |
| commit | 282879afa01936954a570e15b4088a89b6e1b549 (patch) | |
| tree | e732561b9729da7f906f4f8040448c12b321475a /include/linux/pid_namespace.h | |
| parent | 7118daabb65585163fd70eb782f1fbbdb64968a6 (diff) | |
pid: rely on common reference count behavior
Now that we changed the generic reference counting mechanism for all
namespaces to never manipulate reference counts of initial namespaces we
can drop the special handling for pid namespaces.
Link: https://patch.msgid.link/20251110-work-namespace-nstree-fixes-v1-15-e8a9264e0fb9@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/pid_namespace.h')
| -rw-r--r-- | include/linux/pid_namespace.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 445517a72ad0..0e7ae12c96d2 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h @@ -61,8 +61,7 @@ static inline struct pid_namespace *to_pid_ns(struct ns_common *ns) static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) { - if (ns != &init_pid_ns) - ns_ref_inc(ns); + ns_ref_inc(ns); return ns; } |
