Cleanup: remove logically dead code
[lttng-modules.git] / lttng-syscalls.c
index f46fd91ae265e882a8a1c2b6d10558e02d5e0db7..5fa66660b5f2532d715e80d90fb7c8feb6ec08ca 100644 (file)
@@ -37,6 +37,7 @@
 #include "lib/bitfield.h"
 #include "wrapper/tracepoint.h"
 #include "wrapper/file.h"
+#include "wrapper/rcu.h"
 #include "lttng-events.h"
 
 #ifndef CONFIG_COMPAT
@@ -76,6 +77,7 @@ struct oldold_utsname;
 struct old_utsname;
 struct sel_arg_struct;
 struct mmap_arg_struct;
+struct file_handle;
 
 #ifdef IA32_NR_syscalls
 #define NR_compat_syscalls IA32_NR_syscalls
@@ -368,7 +370,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
        if (unlikely(is_compat_task())) {
                struct lttng_syscall_filter *filter;
 
-               filter = rcu_dereference(chan->sc_filter);
+               filter = lttng_rcu_dereference(chan->sc_filter);
                if (filter) {
                        if (id < 0 || id >= NR_compat_syscalls
                                || !test_bit(id, filter->sc_compat)) {
@@ -382,7 +384,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
        } else {
                struct lttng_syscall_filter *filter;
 
-               filter = rcu_dereference(chan->sc_filter);
+               filter = lttng_rcu_dereference(chan->sc_filter);
                if (filter) {
                        if (id < 0 || id >= NR_syscalls
                                || !test_bit(id, filter->sc)) {
@@ -522,7 +524,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
        if (unlikely(is_compat_task())) {
                struct lttng_syscall_filter *filter;
 
-               filter = rcu_dereference(chan->sc_filter);
+               filter = lttng_rcu_dereference(chan->sc_filter);
                if (filter) {
                        if (id < 0 || id >= NR_compat_syscalls
                                || !test_bit(id, filter->sc_compat)) {
@@ -536,7 +538,7 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
        } else {
                struct lttng_syscall_filter *filter;
 
-               filter = rcu_dereference(chan->sc_filter);
+               filter = lttng_rcu_dereference(chan->sc_filter);
                if (filter) {
                        if (id < 0 || id >= NR_syscalls
                                || !test_bit(id, filter->sc)) {
@@ -1288,10 +1290,6 @@ int lttng_abi_syscall_list(void)
        if (ret < 0)
                goto open_error;
        fd_install(file_fd, syscall_list_file);
-       if (file_fd < 0) {
-               ret = file_fd;
-               goto fd_error;
-       }
        return file_fd;
 
 open_error:
This page took 0.028381 seconds and 4 git commands to generate.