]> sourceware.org Git - systemtap.git/commitdiff
PR28184: Adapt to kernel rename __fcheck_files to files_lookup_fd_raw
authorJunlong Li <zhuizhuhaomeng@gmail.com>
Fri, 6 Aug 2021 21:41:53 +0000 (17:41 -0400)
committerStan Cox <scox@redhat.com>
Fri, 6 Aug 2021 21:41:53 +0000 (17:41 -0400)
The 5.11 kernel renamed __fcheck_files to files_lookup_fd_raw

buildrun.cxx
tapset/linux/task.stp

index 6a6725db68cb417d278bf8927644c86f91cbe1a8..a7090c4489419046ca0f56fa1ac9c2f6faf536b0 100644 (file)
@@ -529,6 +529,8 @@ compile_pass (systemtap_session& s)
   output_autoconf(s, o, cs, "autoconf-lockdown-kernel.c", "STAPCONF_LOCKDOWN_KERNEL", NULL);
   output_autoconf(s, o, cs, "autoconf-hlist_add_tail_rcu.c",
                  "STAPCONF_HLIST_ADD_TAIL_RCU", NULL);
+  output_autoconf(s, o, cs, "autoconf-files_lookup_fd_raw.c",
+                  "STAPCONF_FILES_LOOKUP_FD_RAW", NULL);
   output_autoconf(s, o, cs, "autoconf-task-state.c", "STAPCONF_TASK_STATE", NULL);
   
   // used by runtime/linux/netfilter.c
index 40dc3e2e0f94609929b321c0a904bd650544eee3..d47462513e962eae352eb94a69a03f1e261ca815 100644 (file)
@@ -706,7 +706,11 @@ function task_fd_lookup:long(task:long, fd:long)
                (void)kderef_buffer(NULL, files, sizeof(struct files_struct));
 
                spin_lock(&files->file_lock);
+#ifdef STAPCONF_FILES_LOOKUP_FD_RAW
+               file = files_lookup_fd_raw(files, fd);
+#else
                file = fcheck_files(files, fd);
+#endif
                spin_unlock(&files->file_lock);
        }
 
This page took 0.031489 seconds and 5 git commands to generate.