projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wrapper: remove page_alloc wrapper
[lttng-modules.git]
/
lttng-abi.c
diff --git
a/lttng-abi.c
b/lttng-abi.c
index 590945c4e8ee146dd52184b0413e6cdd1a326ee1..fb970a6926ce0eec2d61199f8dedc470ad9eab1f 100644
(file)
--- a/
lttng-abi.c
+++ b/
lttng-abi.c
@@
-30,13
+30,10
@@
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/err.h>
-#include <
wrapper/vmalloc.h> /* for wrapper_vmalloc_sync_all() */
+#include <
linux/kref.h>
#include <wrapper/ringbuffer/vfs.h>
#include <wrapper/ringbuffer/backend.h>
#include <wrapper/ringbuffer/frontend.h>
#include <wrapper/ringbuffer/vfs.h>
#include <wrapper/ringbuffer/backend.h>
#include <wrapper/ringbuffer/frontend.h>
-#include <wrapper/poll.h>
-#include <wrapper/file.h>
-#include <wrapper/kref.h>
#include <lttng-string-utils.h>
#include <lttng-abi.h>
#include <lttng-abi-old.h>
#include <lttng-string-utils.h>
#include <lttng-abi.h>
#include <lttng-abi-old.h>
@@
-81,7
+78,7
@@
int lttng_abi_create_session(void)
session = lttng_session_create();
if (!session)
return -ENOMEM;
session = lttng_session_create();
if (!session)
return -ENOMEM;
- session_fd =
lttng_get_unused_fd(
);
+ session_fd =
get_unused_fd_flags(0
);
if (session_fd < 0) {
ret = session_fd;
goto fd_error;
if (session_fd < 0) {
ret = session_fd;
goto fd_error;
@@
-110,7
+107,7
@@
int lttng_abi_tracepoint_list(void)
struct file *tracepoint_list_file;
int file_fd, ret;
struct file *tracepoint_list_file;
int file_fd, ret;
- file_fd =
lttng_get_unused_fd(
);
+ file_fd =
get_unused_fd_flags(0
);
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
@@
-150,7
+147,7
@@
int lttng_abi_syscall_list(void)
struct file *syscall_list_file;
int file_fd, ret;
struct file *syscall_list_file;
int file_fd, ret;
- file_fd =
lttng_get_unused_fd(
);
+ file_fd =
get_unused_fd_flags(0
);
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
@@
-427,7
+424,7
@@
int lttng_abi_create_channel(struct file *session_file,
int chan_fd;
int ret = 0;
int chan_fd;
int ret = 0;
- chan_fd =
lttng_get_unused_fd(
);
+ chan_fd =
get_unused_fd_flags(0
);
if (chan_fd < 0) {
ret = chan_fd;
goto fd_error;
if (chan_fd < 0) {
ret = chan_fd;
goto fd_error;
@@
-778,7
+775,6
@@
unsigned int lttng_metadata_ring_buffer_poll(struct file *filp,
unsigned int mask = 0;
if (filp->f_mode & FMODE_READ) {
unsigned int mask = 0;
if (filp->f_mode & FMODE_READ) {
- poll_wait_set_exclusive(wait);
poll_wait(filp, &stream->read_wait, wait);
finalized = stream->finalized;
poll_wait(filp, &stream->read_wait, wait);
finalized = stream->finalized;
@@
-1086,7
+1082,7
@@
int lttng_abi_create_stream_fd(struct file *channel_file, void *stream_priv,
int stream_fd, ret;
struct file *stream_file;
int stream_fd, ret;
struct file *stream_file;
- stream_fd =
lttng_get_unused_fd(
);
+ stream_fd =
get_unused_fd_flags(0
);
if (stream_fd < 0) {
ret = stream_fd;
goto fd_error;
if (stream_fd < 0) {
ret = stream_fd;
goto fd_error;
@@
-1178,11
+1174,7
@@
int lttng_abi_open_metadata_stream(struct file *channel_file)
goto notransport;
}
goto notransport;
}
- if (!lttng_kref_get(&session->metadata_cache->refcount)) {
- ret = -EOVERFLOW;
- goto kref_error;
- }
-
+ kref_get(&session->metadata_cache->refcount);
ret = lttng_abi_create_stream_fd(channel_file, stream_priv,
<tng_metadata_ring_buffer_file_operations);
if (ret < 0)
ret = lttng_abi_create_stream_fd(channel_file, stream_priv,
<tng_metadata_ring_buffer_file_operations);
if (ret < 0)
@@
-1194,7
+1186,6
@@
int lttng_abi_open_metadata_stream(struct file *channel_file)
fd_error:
kref_put(&session->metadata_cache->refcount, metadata_cache_destroy);
fd_error:
kref_put(&session->metadata_cache->refcount, metadata_cache_destroy);
-kref_error:
module_put(metadata_stream->transport->owner);
notransport:
kfree(metadata_stream);
module_put(metadata_stream->transport->owner);
notransport:
kfree(metadata_stream);
@@
-1227,7
+1218,7
@@
int lttng_abi_create_event(struct file *channel_file,
default:
break;
}
default:
break;
}
- event_fd =
lttng_get_unused_fd(
);
+ event_fd =
get_unused_fd_flags(0
);
if (event_fd < 0) {
ret = event_fd;
goto fd_error;
if (event_fd < 0) {
ret = event_fd;
goto fd_error;
@@
-1511,7
+1502,6
@@
unsigned int lttng_channel_poll(struct file *file, poll_table *wait)
unsigned int mask = 0;
if (file->f_mode & FMODE_READ) {
unsigned int mask = 0;
if (file->f_mode & FMODE_READ) {
- poll_wait_set_exclusive(wait);
poll_wait(file, channel->ops->get_hp_wait_queue(channel->chan),
wait);
poll_wait(file, channel->ops->get_hp_wait_queue(channel->chan),
wait);
@@
-1938,7
+1928,6
@@
int __init lttng_abi_init(void)
{
int ret = 0;
{
int ret = 0;
- wrapper_vmalloc_sync_all();
lttng_clock_ref();
ret = lttng_tp_mempool_init();
lttng_clock_ref();
ret = lttng_tp_mempool_init();
This page took
0.025204 seconds
and
4
git commands to generate.