Skip to content

Commit d057c10

Browse files
committed
nsproxy: add a cleanup helper for nsproxy
Add a simple cleanup helper for nsproxy. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jeff Layton <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Reviewed-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent c626914 commit d057c10

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/nsproxy.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,6 @@ static inline void get_nsproxy(struct nsproxy *ns)
112112
refcount_inc(&ns->count);
113113
}
114114

115+
DEFINE_FREE(put_nsproxy, struct nsproxy *, if (_T) put_nsproxy(_T))
116+
115117
#endif

0 commit comments

Comments
 (0)