summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_cow.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-03-09 20:38:56 +0000
committeralc <alc@FreeBSD.org>2003-03-09 20:38:56 +0000
commit3a50d97c5c165f2ee59b643bb0e70f8646bbdaa6 (patch)
treeed76febd18e54251528371f5b23db940d51d04be /sys/kern/uipc_cow.c
parente70feef2397e2c6b02288364450b78bb451e4122 (diff)
downloadFreeBSD-src-3a50d97c5c165f2ee59b643bb0e70f8646bbdaa6.zip
FreeBSD-src-3a50d97c5c165f2ee59b643bb0e70f8646bbdaa6.tar.gz
Remove some unnecessary actions by the zero-copy setup and teardown code.
Remove an incorrect comment. (Incrementing an object's reference count does not prevent a process from exiting. The real concern here is that the physical page must not be deleted until transmission is complete. That is already handled by the VM system and sf_buf_free().) Tested by: ken
Diffstat (limited to 'sys/kern/uipc_cow.c')
-rw-r--r--sys/kern/uipc_cow.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/kern/uipc_cow.c b/sys/kern/uipc_cow.c
index 21701e0..dfe2c86 100644
--- a/sys/kern/uipc_cow.c
+++ b/sys/kern/uipc_cow.c
@@ -87,19 +87,15 @@ socow_iodone(void *addr, void *args)
{
int s;
struct sf_buf *sf;
-
- vm_offset_t paddr;
vm_page_t pp;
sf = dtosf(addr);
- paddr = vtophys((vm_offset_t)addr);
- pp = PHYS_TO_VM_PAGE(paddr);
+ pp = sf->m;
s = splvm();
/* remove COW mapping */
vm_page_lock_queues();
vm_page_cowclear(pp);
vm_page_unlock_queues();
- vm_object_deallocate(pp->object);
splx(s);
/* note that sf_buf_free() unwires the page for us*/
sf_buf_free(addr, NULL);
@@ -152,11 +148,6 @@ socow_setup(struct mbuf *m0, struct uio *uio)
vm_page_wire(pp);
vm_page_unlock_queues();
- /*
- * prevent the process from exiting on us.
- */
- vm_object_reference(pp->object);
-
/*
* attach to mbuf
*/
OpenPOWER on IntegriCloud