subr_uio.c (254138) | subr_uio.c (254141) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/subr_uio.c 254138 2013-08-09 11:11:11Z attilio $"); | 38__FBSDID("$FreeBSD: head/sys/kern/subr_uio.c 254141 2013-08-09 11:28:55Z attilio $"); |
39 40#include "opt_zero.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/limits.h> 46#include <sys/lock.h> --- 4 unchanged lines hidden (view full) --- 51#include <sys/sched.h> 52#include <sys/sysctl.h> 53#include <sys/vnode.h> 54 55#include <vm/vm.h> 56#include <vm/vm_param.h> 57#include <vm/vm_extern.h> 58#include <vm/vm_page.h> | 39 40#include "opt_zero.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/limits.h> 46#include <sys/lock.h> --- 4 unchanged lines hidden (view full) --- 51#include <sys/sched.h> 52#include <sys/sysctl.h> 53#include <sys/vnode.h> 54 55#include <vm/vm.h> 56#include <vm/vm_param.h> 57#include <vm/vm_extern.h> 58#include <vm/vm_page.h> |
59#include <vm/vm_pageout.h> |
|
59#include <vm/vm_map.h> 60#ifdef SOCKET_SEND_COW 61#include <vm/vm_object.h> 62#endif 63 64SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, 65 "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)"); 66 --- 50 unchanged lines hidden (view full) --- 117 /* 118 * Even if a physical page does not exist in the 119 * object chain's first object, a physical page from a 120 * backing object may be mapped read only. 121 */ 122 if (uobject->backing_object != NULL) 123 pmap_remove(map->pmap, uaddr, uaddr + PAGE_SIZE); 124 } | 60#include <vm/vm_map.h> 61#ifdef SOCKET_SEND_COW 62#include <vm/vm_object.h> 63#endif 64 65SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, NULL, UIO_MAXIOV, 66 "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)"); 67 --- 50 unchanged lines hidden (view full) --- 118 /* 119 * Even if a physical page does not exist in the 120 * object chain's first object, a physical page from a 121 * backing object may be mapped read only. 122 */ 123 if (uobject->backing_object != NULL) 124 pmap_remove(map->pmap, uaddr, uaddr + PAGE_SIZE); 125 } |
125 vm_page_insert(kern_pg, uobject, upindex); | 126 if (vm_page_insert(kern_pg, uobject, upindex)) { 127 VM_OBJECT_WUNLOCK(uobject); 128 VM_WAIT; 129 VM_OBJECT_WLOCK(uobject); 130 goto retry; 131 } |
126 vm_page_dirty(kern_pg); 127 VM_OBJECT_WUNLOCK(uobject); 128 vm_map_lookup_done(map, entry); 129 return(KERN_SUCCESS); 130} 131#endif /* SOCKET_SEND_COW */ 132 133int --- 472 unchanged lines hidden --- | 132 vm_page_dirty(kern_pg); 133 VM_OBJECT_WUNLOCK(uobject); 134 vm_map_lookup_done(map, entry); 135 return(KERN_SUCCESS); 136} 137#endif /* SOCKET_SEND_COW */ 138 139int --- 472 unchanged lines hidden --- |