1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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
This commit is contained in:
Alan Cox 2003-03-09 20:38:56 +00:00
parent 7f03a257ac
commit 167b972088
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112045

View File

@ -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
*/