X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lib%2Fringbuffer%2Fring_buffer_iterator.c;h=24e3dbb36a39882eeae8a53011f5ebd3303271ab;hb=b1d7664607a672ce9b8aab6d0e4c1ce282d80571;hp=dbfe1f79d644ecb7b4dd6e2a3a1bad4dd3352d37;hpb=5a8fd222992df9bbb709836e5bf4ca053dd776c3;p=lttng-modules.git diff --git a/lib/ringbuffer/ring_buffer_iterator.c b/lib/ringbuffer/ring_buffer_iterator.c index dbfe1f79..24e3dbb3 100644 --- a/lib/ringbuffer/ring_buffer_iterator.c +++ b/lib/ringbuffer/ring_buffer_iterator.c @@ -1,19 +1,32 @@ /* * ring_buffer_iterator.c * - * (C) Copyright 2010 - Mathieu Desnoyers - * * Ring buffer and channel iterators. Get each event of a channel in order. Uses * a prio heap for per-cpu buffers, giving a O(log(NR_CPUS)) algorithmic * complexity for the "get next event" operation. * + * Copyright (C) 2010-2012 Mathieu Desnoyers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; only + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * * Author: * Mathieu Desnoyers - * - * Dual LGPL v2.1/GPL v2 license. */ #include "../../wrapper/ringbuffer/iterator.h" +#include "../../wrapper/file.h" #include #include #include @@ -339,7 +352,7 @@ void lib_ring_buffer_iterator_init(struct channel *chan, struct lib_ring_buffer #ifdef CONFIG_HOTPLUG_CPU static -int __cpuinit channel_iterator_cpu_hotplug(struct notifier_block *nb, +int channel_iterator_cpu_hotplug(struct notifier_block *nb, unsigned long action, void *hcpu) { @@ -679,7 +692,7 @@ ssize_t lib_ring_buffer_file_read(struct file *filp, size_t count, loff_t *ppos) { - struct inode *inode = filp->f_dentry->d_inode; + struct inode *inode = filp->lttng_f_dentry->d_inode; struct lib_ring_buffer *buf = inode->i_private; struct channel *chan = buf->backend.chan; @@ -704,7 +717,7 @@ ssize_t channel_file_read(struct file *filp, size_t count, loff_t *ppos) { - struct inode *inode = filp->f_dentry->d_inode; + struct inode *inode = filp->lttng_f_dentry->d_inode; struct channel *chan = inode->i_private; const struct lib_ring_buffer_config *config = &chan->backend.config; @@ -784,7 +797,7 @@ const struct file_operations channel_payload_file_operations = { .open = channel_file_open, .release = channel_file_release, .read = channel_file_read, - .llseek = lib_ring_buffer_no_llseek, + .llseek = vfs_lib_ring_buffer_no_llseek, }; EXPORT_SYMBOL_GPL(channel_payload_file_operations); @@ -793,6 +806,6 @@ const struct file_operations lib_ring_buffer_payload_file_operations = { .open = lib_ring_buffer_file_open, .release = lib_ring_buffer_file_release, .read = lib_ring_buffer_file_read, - .llseek = lib_ring_buffer_no_llseek, + .llseek = vfs_lib_ring_buffer_no_llseek, }; EXPORT_SYMBOL_GPL(lib_ring_buffer_payload_file_operations);