Deleted Added
full compact
nfs_srvsubs.c (6417) nfs_srvsubs.c (6420)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Rick Macklem at The University of Guelph.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
37 * $Id: nfs_subs.c,v 1.9 1995/02/06 02:20:40 davidg Exp $
37 * $Id: nfs_subs.c,v 1.10 1995/02/15 03:40:00 davidg Exp $
38 */
39
40/*
41 * These functions support the macros and help fiddle mbuf chains for
42 * the nfs op functions. They do things like create the rpc header and
43 * copy data between mbuf chains and uio lists.
44 */
45#include <sys/param.h>

--- 20 unchanged lines hidden (view full) ---

66#include <nfs/xdr_subs.h>
67#include <nfs/nfsm_subs.h>
68#include <nfs/nfsmount.h>
69#include <nfs/nqnfs.h>
70#include <nfs/nfsrtt.h>
71
72#include <miscfs/specfs/specdev.h>
73
38 */
39
40/*
41 * These functions support the macros and help fiddle mbuf chains for
42 * the nfs op functions. They do things like create the rpc header and
43 * copy data between mbuf chains and uio lists.
44 */
45#include <sys/param.h>

--- 20 unchanged lines hidden (view full) ---

66#include <nfs/xdr_subs.h>
67#include <nfs/nfsm_subs.h>
68#include <nfs/nfsmount.h>
69#include <nfs/nqnfs.h>
70#include <nfs/nfsrtt.h>
71
72#include <miscfs/specfs/specdev.h>
73
74#include <vm/vnode_pager.h>
75
74#include <netinet/in.h>
75#ifdef ISO
76#include <netiso/iso.h>
77#endif
78
79#define TRUE 1
80#define FALSE 0
81

--- 1086 unchanged lines hidden (view full) ---

1168 default:
1169 break;
1170 };
1171 return (0);
1172}
1173
1174int
1175nfsrv_vmio( struct vnode *vp) {
76#include <netinet/in.h>
77#ifdef ISO
78#include <netiso/iso.h>
79#endif
80
81#define TRUE 1
82#define FALSE 0
83

--- 1086 unchanged lines hidden (view full) ---

1170 default:
1171 break;
1172 };
1173 return (0);
1174}
1175
1176int
1177nfsrv_vmio( struct vnode *vp) {
1176 int rtval;
1177 vm_object_t object;
1178 vm_pager_t pager;
1179
1180 if( (vp == NULL) || (vp->v_type != VREG))
1181 return 1;
1182
1183retry:
1184 if( (vp->v_flag & VVMIO) == 0) {
1178 vm_object_t object;
1179 vm_pager_t pager;
1180
1181 if( (vp == NULL) || (vp->v_type != VREG))
1182 return 1;
1183
1184retry:
1185 if( (vp->v_flag & VVMIO) == 0) {
1185 pager = (vm_pager_t) vnode_pager_alloc(vp, 0, 0, 0);
1186 pager = (vm_pager_t) vnode_pager_alloc((caddr_t) vp, 0, 0, 0);
1186 object = (vm_object_t) vp->v_vmdata;
1187 if( object->pager != pager)
1188 panic("nfsrv_vmio: pager/object mismatch");
1189 (void) vm_object_lookup( pager);
1190 pager_cache( object, TRUE);
1191 vp->v_flag |= VVMIO;
1192 } else {
1193 if( (object = (vm_object_t)vp->v_vmdata) &&

--- 33 unchanged lines hidden ---
1187 object = (vm_object_t) vp->v_vmdata;
1188 if( object->pager != pager)
1189 panic("nfsrv_vmio: pager/object mismatch");
1190 (void) vm_object_lookup( pager);
1191 pager_cache( object, TRUE);
1192 vp->v_flag |= VVMIO;
1193 } else {
1194 if( (object = (vm_object_t)vp->v_vmdata) &&

--- 33 unchanged lines hidden ---