diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
index 5601d14e288693766dfbd9fc09e94df9475d21c0..e6bec522b1391fc2ea0c5d0082f818c02c87b77d 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