1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00

Fix mmap(2) on ZFS after some changes in VM subsystem.

Submitted by:	alc
Reported by:	kris (originally) and many others
Tested with:	fsx
MFC after:	1 week
This commit is contained in:
Pawel Jakub Dawidek 2008-03-15 23:23:04 +00:00
parent 1f49b573e1
commit 2b1c6615bc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177230
2 changed files with 8 additions and 0 deletions

View File

@ -346,6 +346,10 @@ mappedwrite(vnode_t *vp, int nbytes, uio_t *uio, dmu_tx_t *tx)
VM_OBJECT_LOCK(obj);
vm_page_wakeup(m);
} else {
if (__predict_false(obj->cache != NULL)) {
vm_page_cache_free(obj, OFF_TO_IDX(start),
OFF_TO_IDX(start) + 1);
}
dirbytes += bytes;
}
len -= bytes;

View File

@ -346,6 +346,10 @@ mappedwrite(vnode_t *vp, int nbytes, uio_t *uio, dmu_tx_t *tx)
VM_OBJECT_LOCK(obj);
vm_page_wakeup(m);
} else {
if (__predict_false(obj->cache != NULL)) {
vm_page_cache_free(obj, OFF_TO_IDX(start),
OFF_TO_IDX(start) + 1);
}
dirbytes += bytes;
}
len -= bytes;