diff options
author | 2022-02-28 23:12:55 -0800 | |
---|---|---|
committer | 2022-02-28 23:12:55 -0800 | |
commit | 1136fa0c07de570dc17858745af8be169d1440ba (patch) | |
tree | 3221b003517dd3cb13df5ba4b85637cd9ed82692 /include/linux/ipc_namespace.h | |
parent | Input: samsung-keypad - properly state IOMEM dependency (diff) | |
parent | Linux 5.17-rc4 (diff) | |
download | wireguard-linux-1136fa0c07de570dc17858745af8be169d1440ba.tar.xz wireguard-linux-1136fa0c07de570dc17858745af8be169d1440ba.zip |
Merge tag 'v5.17-rc4' into for-linus
Merge with mainline to get the Intel ASoC generic helpers header and
other changes.
Diffstat (limited to 'include/linux/ipc_namespace.h')
-rw-r--r-- | include/linux/ipc_namespace.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 05e22770af51..b75395ec8d52 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h @@ -131,6 +131,16 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) return ns; } +static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns) +{ + if (ns) { + if (refcount_inc_not_zero(&ns->ns.count)) + return ns; + } + + return NULL; +} + extern void put_ipc_ns(struct ipc_namespace *ns); #else static inline struct ipc_namespace *copy_ipcs(unsigned long flags, @@ -147,6 +157,11 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) return ns; } +static inline struct ipc_namespace *get_ipc_ns_not_zero(struct ipc_namespace *ns) +{ + return ns; +} + static inline void put_ipc_ns(struct ipc_namespace *ns) { } |