Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

timens: Add a __free() wrapper for put_time_ns()

The wrapper will be used to simplify cleanups of 'struct time_namespace'.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260330-timens-cleanup-v1-1-936e91c9dd30@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
c2de5a5b 1b6c8928

+3
+3
include/linux/time_namespace.h
··· 8 8 #include <linux/ns_common.h> 9 9 #include <linux/err.h> 10 10 #include <linux/time64.h> 11 + #include <linux/cleanup.h> 11 12 12 13 struct user_namespace; 13 14 extern struct user_namespace init_user_ns; ··· 171 170 return NULL; 172 171 } 173 172 #endif /* CONFIG_TIME_NS_VDSO */ 173 + 174 + DEFINE_FREE(time_ns, struct time_namespace *, if (_T) put_time_ns(_T)) 174 175 175 176 #endif /* _LINUX_TIMENS_H */