Add a simple cleanup helper for nsproxy. Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> --- include/linux/nsproxy.h | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.43.0