kern_sendfile.c (285910) | kern_sendfile.c (292373) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * sendfile(2) and related extensions: 6 * Copyright (c) 1998, David Greenman. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/kern/uipc_syscalls.c 285910 2015-07-27 13:17:57Z ed $"); | 36__FBSDID("$FreeBSD: head/sys/kern/uipc_syscalls.c 292373 2015-12-16 21:30:45Z glebius $"); |
37 38#include "opt_capsicum.h" 39#include "opt_inet.h" 40#include "opt_inet6.h" 41#include "opt_compat.h" 42#include "opt_ktrace.h" 43 44#include <sys/param.h> --- 1983 unchanged lines hidden (view full) --- 2028 */ 2029 error = vn_rdwr(UIO_READ, vp, NULL, readahead, trunc_page(off), 2030 UIO_NOCOPY, IO_NODELOCKED | IO_VMIO | ((readahead / 2031 bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); 2032 SFSTAT_INC(sf_iocnt); 2033 VM_OBJECT_WLOCK(obj); 2034 } else { 2035 if (vm_pager_has_page(obj, pindex, NULL, NULL)) { | 37 38#include "opt_capsicum.h" 39#include "opt_inet.h" 40#include "opt_inet6.h" 41#include "opt_compat.h" 42#include "opt_ktrace.h" 43 44#include <sys/param.h> --- 1983 unchanged lines hidden (view full) --- 2028 */ 2029 error = vn_rdwr(UIO_READ, vp, NULL, readahead, trunc_page(off), 2030 UIO_NOCOPY, IO_NODELOCKED | IO_VMIO | ((readahead / 2031 bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); 2032 SFSTAT_INC(sf_iocnt); 2033 VM_OBJECT_WLOCK(obj); 2034 } else { 2035 if (vm_pager_has_page(obj, pindex, NULL, NULL)) { |
2036 rv = vm_pager_get_pages(obj, &m, 1, 0); | 2036 rv = vm_pager_get_pages(obj, &m, 1, NULL, NULL); |
2037 SFSTAT_INC(sf_iocnt); 2038 if (rv != VM_PAGER_OK) { 2039 vm_page_lock(m); 2040 vm_page_free(m); 2041 vm_page_unlock(m); 2042 m = NULL; 2043 error = EIO; 2044 } --- 526 unchanged lines hidden --- | 2037 SFSTAT_INC(sf_iocnt); 2038 if (rv != VM_PAGER_OK) { 2039 vm_page_lock(m); 2040 vm_page_free(m); 2041 vm_page_unlock(m); 2042 m = NULL; 2043 error = EIO; 2044 } --- 526 unchanged lines hidden --- |