fix: missing include for 'task_struct' in fdtable.h
[lttng-modules.git] / include / wrapper / fdtable.h
index 996199a7b00093a4615362fc17f0fb1ea7241b70..8f01a194a7b5131e152b342441b0d258924fa56f 100644 (file)
 
 #include <linux/version.h>
 #include <linux/fdtable.h>
+#include <linux/sched.h>
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+static inline
+struct file *lttng_lookup_fd_rcu(unsigned int fd)
+{
+       return lookup_fd_rcu(fd);
+}
+#else
+static inline
+struct file *lttng_lookup_fd_rcu(unsigned int fd)
+{
+       return fcheck(fd);
+}
+#endif
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
 
This page took 0.062597 seconds and 4 git commands to generate.