[lttng-dev] [PATCH 2/3] wrapper/fdtable: adjust fd lookup to v6.7+

Bruce Ashfield via lttng-dev <[email protected]>
Newsgroups org.lttng.lists.lttng-dev
Message-ID <[email protected]>
From: Bruce Ashfield <[email protected]>

commit 0ede61d8589cc2d93 [file: convert to SLAB_TYPESAFE_BY_RCU]
renames lookup_fd_rcu to lookup_fdget_rcu, so we need to
version adjust the fdtable wrapper accordingly.

Signed-off-by: Bruce Ashfield <[email protected]>
---

Repeating the comment from patch 1 of this series:

Someone else may or may not already have this in flight,
but I didn't see anything on the list or in the git
repo.

I ran into this failure when working on the v6.7-rc
kernel as part of yocto project kernel updates.

Tweak as necessary, as I'm no expert in the right way
to version these sort of changes.

Bruce


 include/wrapper/fdtable.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/wrapper/fdtable.h b/include/wrapper/fdtable.h
index fa5f7207..aaf2b9e7 100644
--- a/include/wrapper/fdtable.h
+++ b/include/wrapper/fdtable.h
@@ -16,7 +16,11 @@
 static inline
 struct file *lttng_lookup_fd_rcu(unsigned int fd)
 {
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(6,7,0))
 	return lookup_fd_rcu(fd);
+#else
+	return lookup_fdget_rcu(fd);
+#endif
 }
 #else
 static inline
-- 
2.34.1

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.