diff options
| author | Alan Cox <alc@FreeBSD.org> | 2008-02-07 05:55:16 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2008-02-07 05:55:16 +0000 |
| commit | fb73a5ab6c532984307b2688623f37b5028b973b (patch) | |
| tree | da99a524d8a67471561fffcaaca80c05a11bcdd1 | |
| parent | a373e66b8538363612ced5d272cdede45e722629 (diff) | |
Notes
| -rw-r--r-- | sys/kern/uipc_shm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index cf7212f24e26..0154a4076182 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -287,6 +287,10 @@ shm_dotruncate(struct shmfd *shmfd, off_t length) if (m->dirty != 0) m->dirty = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); + } else if ((length & PAGE_MASK) && + __predict_false(object->cache != NULL)) { + vm_page_cache_free(object, OFF_TO_IDX(length), + nobjsize); } } shmfd->shm_size = length; |
