Date: Wed, 16 Dec 2015 22:59:32 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r292382 - projects/sendfile/sys/kern Message-ID: <201512162259.tBGMxWik007928@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Wed Dec 16 22:59:32 2015 New Revision: 292382 URL: https://svnweb.freebsd.org/changeset/base/292382 Log: Fix a bug when we request I/O into a valid page. Modified: projects/sendfile/sys/kern/uipc_syscalls.c Modified: projects/sendfile/sys/kern/uipc_syscalls.c ============================================================================== --- projects/sendfile/sys/kern/uipc_syscalls.c Wed Dec 16 22:48:32 2015 (r292381) +++ projects/sendfile/sys/kern/uipc_syscalls.c Wed Dec 16 22:59:32 2015 (r292382) @@ -2215,6 +2215,8 @@ sendfile_swapin(vm_object_t obj, struct * pages for it. Since readahead is optional, we prefer * failure over sleep and thus say VM_ALLOC_NOWAIT. */ + if (j < npages) + a = min(a, j - i - 1); count = min(a + 1, npages + rhpages - i); for (j = npages; j < i + count; j++) { pa[j] = vm_page_grab(obj, OFF_TO_IDX(vmoff(j, off)),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512162259.tBGMxWik007928>