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:
parent
1f49b573e1
commit
2b1c6615bc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177230
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user