X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lib%2Fringbuffer%2Fring_buffer_mmap.c;h=ad67288817b57cf896ddc8e0def8533a5d9b77b0;hb=b53047135828b997a4eeb2cae7344cb169aa9c8c;hp=35d30e7ec75d2426d4b74f3debb3466eb07b74ba;hpb=c075712b6e6ba766c844f4504ac012c49d1f6b4b;p=lttng-modules.git diff --git a/lib/ringbuffer/ring_buffer_mmap.c b/lib/ringbuffer/ring_buffer_mmap.c index 35d30e7e..ad672888 100644 --- a/lib/ringbuffer/ring_buffer_mmap.c +++ b/lib/ringbuffer/ring_buffer_mmap.c @@ -1,38 +1,26 @@ -/* +/* SPDX-License-Identifier: GPL-2.0-only + * * ring_buffer_mmap.c * * Copyright (C) 2002-2005 - Tom Zanussi , IBM Corp * Copyright (C) 1999-2005 - Karim Yaghmour * Copyright (C) 2008-2012 - Mathieu Desnoyers * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; only version 2 of the License. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Re-using code from kernel/relay.c, hence the GPLv2 license for this + * Re-using code from kernel/relay.c, hence the GPL-2.0-only license for this * file. */ #include #include -#include -#include -#include +#include +#include +#include /* * fault() vm_op implementation for ring buffer file mapping. */ -static int lib_ring_buffer_fault(struct vm_area_struct *vma, struct vm_fault *vmf) +static vm_fault_t lib_ring_buffer_fault_compat(struct vm_area_struct *vma, struct vm_fault *vmf) { struct lib_ring_buffer *buf = vma->vm_private_data; struct channel *chan = buf->backend.chan; @@ -65,6 +53,12 @@ static int lib_ring_buffer_fault(struct vm_area_struct *vma, struct vm_fault *vm return 0; } +static vm_fault_t lib_ring_buffer_fault(struct vm_fault *vmf) +{ + struct vm_area_struct *vma = vmf->vma; + return lib_ring_buffer_fault_compat(vma, vmf); +} + /* * vm_ops for ring buffer file mappings. */