From 30f18bf0814f797f13837967fbc4617796f1742b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 24 May 2011 22:18:57 -0400 Subject: [PATCH] Tracepoint list ABI: fix initialization of anonymous file Signed-off-by: Mathieu Desnoyers --- ltt-debugfs-abi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: -- 2.34.1