diff options
author | pjd <pjd@FreeBSD.org> | 2008-03-15 23:23:04 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-03-15 23:23:04 +0000 |
commit | f924bfc1c5932f20f0ee3006632ee0a06658cd6a (patch) | |
tree | ee0717f142924c5b23ca2b2db45193cfcd4b9692 | |
parent | a786aa30ca137671c71aad0d73307e6217588f14 (diff) | |
download | FreeBSD-src-f924bfc1c5932f20f0ee3006632ee0a06658cd6a.zip FreeBSD-src-f924bfc1c5932f20f0ee3006632ee0a06658cd6a.tar.gz |
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
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 8c67a59..4008178 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -346,6 +346,10 @@ again: 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; diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 8c67a59..4008178 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -346,6 +346,10 @@ again: 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; |