Patrick Williams | da29531 | 2023-12-05 16:48:56 -0600 | [diff] [blame] | 1 | From 76e4ea0c33a8c7726c0df28083d5c8bc1c1335e8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> |
| 3 | Date: Thu, 23 Nov 2023 13:49:51 -0500 |
| 4 | Subject: [PATCH] wrapper/fdtable: adjust fd lookup to v6.7+ |
| 5 | |
| 6 | commit 0ede61d8589cc2d93 [file: convert to SLAB_TYPESAFE_BY_RCU] |
| 7 | renames lookup_fd_rcu to lookup_fdget_rcu, so we need to |
| 8 | version adjust the fdtable wrapper accordingly. |
| 9 | |
| 10 | Upstream-Status: Submitted [https://lists.lttng.org/pipermail/lttng-dev/2023-November/030667.html] |
| 11 | |
| 12 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> |
| 13 | --- |
| 14 | include/wrapper/fdtable.h | 4 ++++ |
| 15 | 1 file changed, 4 insertions(+) |
| 16 | |
| 17 | diff --git a/include/wrapper/fdtable.h b/include/wrapper/fdtable.h |
| 18 | index fa5f7207..aaf2b9e7 100644 |
| 19 | --- a/include/wrapper/fdtable.h |
| 20 | +++ b/include/wrapper/fdtable.h |
| 21 | @@ -16,7 +16,11 @@ |
| 22 | static inline |
| 23 | struct file *lttng_lookup_fd_rcu(unsigned int fd) |
| 24 | { |
| 25 | +#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(6,7,0)) |
| 26 | return lookup_fd_rcu(fd); |
| 27 | +#else |
| 28 | + return lookup_fdget_rcu(fd); |
| 29 | +#endif |
| 30 | } |
| 31 | #else |
| 32 | static inline |
| 33 | -- |
| 34 | 2.34.1 |
| 35 | |