*/
#include <wrapper/fdtable.h>
+#include <linux/file.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/namei.h>
* Returns the file backing the given fd. Needs to be done inside an RCU
* critical section.
*/
- file = lttng_lookup_fd_rcu(fd);
+ file = lttng_lookup_fdget_rcu(fd);
if (file == NULL) {
printk(KERN_WARNING "LTTng: Cannot access file backing the fd(%d)\n", fd);
inode = NULL;
inode = igrab(file->f_path.dentry->d_inode);
if (inode == NULL)
printk(KERN_WARNING "LTTng: Cannot grab a reference on the inode.\n");
+
error:
rcu_read_unlock();
+ if (file)
+ fput(file);
return inode;
}