svn commit: r260822 - projects/sendfile/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Fri Jan 17 11:18:40 UTC 2014
Author: glebius
Date: Fri Jan 17 11:18:39 2014
New Revision: 260822
URL: http://svnweb.freebsd.org/changeset/base/260822
Log:
Fix xfsize() for a case when file ends exactly at page boundary.
Modified:
projects/sendfile/sys/kern/uipc_syscalls.c
Modified: projects/sendfile/sys/kern/uipc_syscalls.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_syscalls.c Fri Jan 17 11:17:28 2014 (r260821)
+++ projects/sendfile/sys/kern/uipc_syscalls.c Fri Jan 17 11:18:39 2014 (r260822)
@@ -2113,7 +2113,7 @@ xfsize(int i, int n, off_t off, off_t le
if (i == 0)
return (omin(PAGE_SIZE - (off & PAGE_MASK), len));
- if (i == n - 1)
+ if (i == n - 1 && ((off + len) & PAGE_MASK) > 0)
return ((off + len) & PAGE_MASK);
return (PAGE_SIZE);
More information about the svn-src-projects
mailing list