#include <lttng-kernel-version.h>
#include <linux/fdtable.h>
+#include <linux/sched.h>
+
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_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 (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,7,0))