wrapper: remove file.h wrapper
[lttng-modules.git] / lib / ringbuffer / ring_buffer_iterator.c
index 9efe49194f7d4b1efd11883f407fb1f979a8f2db..df09aabc1afc49fb936e1ece33948dbcd008bc02 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+/* SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only)
  *
  * ring_buffer_iterator.c
  *
@@ -10,7 +10,8 @@
  */
 
 #include <wrapper/ringbuffer/iterator.h>
-#include <wrapper/file.h>
+#include <linux/file.h>
+#include <linux/uaccess.h>
 #include <linux/jiffies.h>
 #include <linux/delay.h>
 #include <linux/module.h>
@@ -605,7 +606,7 @@ ssize_t channel_ring_buffer_file_read(struct file *filp,
        ssize_t len;
 
        might_sleep();
-       if (!access_ok(VERIFY_WRITE, user_buf, count))
+       if (!access_ok(user_buf, count))
                return -EFAULT;
 
        /* Finish copy of previous record */
@@ -721,7 +722,7 @@ ssize_t lib_ring_buffer_file_read(struct file *filp,
                                  size_t count,
                                  loff_t *ppos)
 {
-       struct inode *inode = filp->lttng_f_dentry->d_inode;
+       struct inode *inode = filp->f_path.dentry->d_inode;
        struct lib_ring_buffer *buf = inode->i_private;
        struct channel *chan = buf->backend.chan;
 
@@ -746,7 +747,7 @@ ssize_t channel_file_read(struct file *filp,
                          size_t count,
                          loff_t *ppos)
 {
-       struct inode *inode = filp->lttng_f_dentry->d_inode;
+       struct inode *inode = filp->f_path.dentry->d_inode;
        struct channel *chan = inode->i_private;
        const struct lib_ring_buffer_config *config = &chan->backend.config;
 
This page took 0.02439 seconds and 4 git commands to generate.