From: Mathieu Desnoyers Date: Wed, 25 May 2011 02:18:57 +0000 (-0400) Subject: Tracepoint list ABI: fix initialization of anonymous file X-Git-Tag: v2.0-pre1~92 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=30f18bf0814f797f13837967fbc4617796f1742b;p=lttng-modules.git Tracepoint list ABI: fix initialization of anonymous file Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-debugfs-abi.c b/ltt-debugfs-abi.c index c5ca6325..5bfd1d68 100644 --- a/ltt-debugfs-abi.c +++ b/ltt-debugfs-abi.c @@ -95,6 +95,7 @@ int lttng_abi_tracepoint_list(void) ret = file_fd; goto fd_error; } + tracepoint_list_file = anon_inode_getfile("[lttng_session]", <tng_tracepoint_list_fops, NULL, O_RDWR); @@ -102,9 +103,18 @@ int lttng_abi_tracepoint_list(void) ret = PTR_ERR(tracepoint_list_file); goto file_error; } + ret = lttng_tracepoint_list_fops.open(NULL, tracepoint_list_file); + if (ret < 0) + goto open_error; fd_install(file_fd, tracepoint_list_file); + if (file_fd < 0) { + ret = file_fd; + goto fd_error; + } return file_fd; +open_error: + fput(tracepoint_list_file); file_error: put_unused_fd(file_fd); fd_error: