svn commit: r346153 - stable/12/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Fri Apr 12 15:00:43 UTC 2019
Author: kib
Date: Fri Apr 12 15:00:42 2019
New Revision: 346153
URL: https://svnweb.freebsd.org/changeset/base/346153
Log:
MFC r345955:
vn_vmap_seekhole(): align running offset to the block boundary.
Modified:
stable/12/sys/kern/vfs_vnops.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/kern/vfs_vnops.c
==============================================================================
--- stable/12/sys/kern/vfs_vnops.c Fri Apr 12 14:59:28 2019 (r346152)
+++ stable/12/sys/kern/vfs_vnops.c Fri Apr 12 15:00:42 2019 (r346153)
@@ -2163,7 +2163,8 @@ vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *
goto unlock;
}
bsize = vp->v_mount->mnt_stat.f_iosize;
- for (bn = noff / bsize; noff < va.va_size; bn++, noff += bsize) {
+ for (bn = noff / bsize; noff < va.va_size; bn++, noff += bsize -
+ noff % bsize) {
error = VOP_BMAP(vp, bn, NULL, &bnp, NULL, NULL);
if (error == EOPNOTSUPP) {
error = ENOTTY;
More information about the svn-src-stable-12
mailing list