diff options
author | alc <alc@FreeBSD.org> | 2011-02-05 21:21:27 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2011-02-05 21:21:27 +0000 |
commit | 11491a4c5e318059ea9051b6523ce066255020e4 (patch) | |
tree | 17ca053f5237cdf00df048613ae24ad00ba77d0e /sys/nfsserver | |
parent | 0410b9c4fd31dc29ce008f99b4f751d2a0dc37fe (diff) | |
download | FreeBSD-src-11491a4c5e318059ea9051b6523ce066255020e4.zip FreeBSD-src-11491a4c5e318059ea9051b6523ce066255020e4.tar.gz |
Unless "cnt" exceeds MAX_COMMIT_COUNT, nfsrv_commit() and nfsvno_fsync() are
incorrectly calling vm_object_page_clean(). They are passing the length of
the range rather than the ending offset of the range.
Perform the OFF_TO_IDX() conversion in vm_object_page_clean() rather than the
callers.
Reviewed by: kib
MFC after: 3 weeks
Diffstat (limited to 'sys/nfsserver')
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index eb14d12..5614ea4 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -3480,7 +3480,8 @@ nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, if (vp->v_object && (vp->v_object->flags & OBJ_MIGHTBEDIRTY)) { VM_OBJECT_LOCK(vp->v_object); - vm_object_page_clean(vp->v_object, off / PAGE_SIZE, (cnt + PAGE_MASK) / PAGE_SIZE, OBJPC_SYNC); + vm_object_page_clean(vp->v_object, off, off + cnt, + OBJPC_SYNC); VM_OBJECT_UNLOCK(vp->v_object); } |