diff options
author | Christian Brauner <brauner@kernel.org> | 2024-06-27 16:11:40 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-06-28 10:37:28 +0200 |
commit | d057c108155ab8d02b603c7ee5da7df615c2f32f (patch) | |
tree | 8c7c32496bf5cd6fd252808e9b135b36e251ab59 | |
parent | c6269149cbf7053272d918101981869438ff7c1e (diff) |
nsproxy: add a cleanup helper for nsproxy
Add a simple cleanup helper for nsproxy.
Link: https://lore.kernel.org/r/20240627-work-pidfs-v1-2-7e9ab6cc3bb1@kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | include/linux/nsproxy.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 5601d14e2886..e6bec522b139 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h @@ -112,4 +112,6 @@ static inline void get_nsproxy(struct nsproxy *ns) refcount_inc(&ns->count); } +DEFINE_FREE(put_nsproxy, struct nsproxy *, if (_T) put_nsproxy(_T)) + #endif |