Deleted Added
full compact
nfs_vnops.c (36503) nfs_vnops.c (36511)
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_vnops.c 8.16 (Berkeley) 5/27/95
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_vnops.c 8.16 (Berkeley) 5/27/95
37 * $Id: nfs_vnops.c,v 1.91 1998/05/31 01:03:07 peter Exp $
37 * $Id: nfs_vnops.c,v 1.92 1998/05/31 17:27:55 peter Exp $
38 */
39
40
41/*
42 * vnode op calls for Sun NFS version 2 and 3
43 */
44
45#include "opt_inet.h"

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

117static int nfs_link __P((struct vop_link_args *));
118static int nfs_rename __P((struct vop_rename_args *));
119static int nfs_mkdir __P((struct vop_mkdir_args *));
120static int nfs_rmdir __P((struct vop_rmdir_args *));
121static int nfs_symlink __P((struct vop_symlink_args *));
122static int nfs_readdir __P((struct vop_readdir_args *));
123static int nfs_bmap __P((struct vop_bmap_args *));
124static int nfs_strategy __P((struct vop_strategy_args *));
38 */
39
40
41/*
42 * vnode op calls for Sun NFS version 2 and 3
43 */
44
45#include "opt_inet.h"

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

117static int nfs_link __P((struct vop_link_args *));
118static int nfs_rename __P((struct vop_rename_args *));
119static int nfs_mkdir __P((struct vop_mkdir_args *));
120static int nfs_rmdir __P((struct vop_rmdir_args *));
121static int nfs_symlink __P((struct vop_symlink_args *));
122static int nfs_readdir __P((struct vop_readdir_args *));
123static int nfs_bmap __P((struct vop_bmap_args *));
124static int nfs_strategy __P((struct vop_strategy_args *));
125static int nfs_lookitup __P((struct vnode *,char *,int,struct ucred *,struct proc *,struct nfsnode **));
125static int nfs_lookitup __P((struct vnode *, const char *, int,
126 struct ucred *, struct proc *, struct nfsnode **));
126static int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentname *));
127static int nfsspec_access __P((struct vop_access_args *));
128static int nfs_readlink __P((struct vop_readlink_args *));
129static int nfs_print __P((struct vop_print_args *));
130static int nfs_advlock __P((struct vop_advlock_args *));
131static int nfs_bwrite __P((struct vop_bwrite_args *));
132/*
133 * Global vfs data structures for nfs

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

217 { &fifo_nfsv2nodeop_p, nfsv2_fifoop_entries };
218VNODEOP_SET(fifo_nfsv2nodeop_opv_desc);
219
220static int nfs_commit __P((struct vnode *vp, u_quad_t offset, int cnt,
221 struct ucred *cred, struct proc *procp));
222static int nfs_mknodrpc __P((struct vnode *dvp, struct vnode **vpp,
223 struct componentname *cnp,
224 struct vattr *vap));
127static int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentname *));
128static int nfsspec_access __P((struct vop_access_args *));
129static int nfs_readlink __P((struct vop_readlink_args *));
130static int nfs_print __P((struct vop_print_args *));
131static int nfs_advlock __P((struct vop_advlock_args *));
132static int nfs_bwrite __P((struct vop_bwrite_args *));
133/*
134 * Global vfs data structures for nfs

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

218 { &fifo_nfsv2nodeop_p, nfsv2_fifoop_entries };
219VNODEOP_SET(fifo_nfsv2nodeop_opv_desc);
220
221static int nfs_commit __P((struct vnode *vp, u_quad_t offset, int cnt,
222 struct ucred *cred, struct proc *procp));
223static int nfs_mknodrpc __P((struct vnode *dvp, struct vnode **vpp,
224 struct componentname *cnp,
225 struct vattr *vap));
225static int nfs_removerpc __P((struct vnode *dvp, char *name, int namelen,
226static int nfs_removerpc __P((struct vnode *dvp, const char *name,
227 int namelen,
226 struct ucred *cred, struct proc *proc));
228 struct ucred *cred, struct proc *proc));
227static int nfs_renamerpc __P((struct vnode *fdvp, char *fnameptr,
229static int nfs_renamerpc __P((struct vnode *fdvp, const char *fnameptr,
228 int fnamelen, struct vnode *tdvp,
230 int fnamelen, struct vnode *tdvp,
229 char *tnameptr, int tnamelen,
231 const char *tnameptr, int tnamelen,
230 struct ucred *cred, struct proc *proc));
231static int nfs_renameit __P((struct vnode *sdvp,
232 struct componentname *scnp,
233 struct sillyrename *sp));
234
235/*
236 * Global variables
237 */

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

1491}
1492
1493/*
1494 * Nfs remove rpc, called from nfs_remove() and nfs_removeit().
1495 */
1496static int
1497nfs_removerpc(dvp, name, namelen, cred, proc)
1498 register struct vnode *dvp;
232 struct ucred *cred, struct proc *proc));
233static int nfs_renameit __P((struct vnode *sdvp,
234 struct componentname *scnp,
235 struct sillyrename *sp));
236
237/*
238 * Global variables
239 */

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

1493}
1494
1495/*
1496 * Nfs remove rpc, called from nfs_remove() and nfs_removeit().
1497 */
1498static int
1499nfs_removerpc(dvp, name, namelen, cred, proc)
1500 register struct vnode *dvp;
1499 char *name;
1501 const char *name;
1500 int namelen;
1501 struct ucred *cred;
1502 struct proc *proc;
1503{
1504 register u_long *tl;
1505 register caddr_t cp;
1506 register long t1, t2;
1507 caddr_t bpos, dpos, cp2;

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

1609}
1610
1611/*
1612 * Do an nfs rename rpc. Called from nfs_rename() and nfs_renameit().
1613 */
1614static int
1615nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc)
1616 register struct vnode *fdvp;
1502 int namelen;
1503 struct ucred *cred;
1504 struct proc *proc;
1505{
1506 register u_long *tl;
1507 register caddr_t cp;
1508 register long t1, t2;
1509 caddr_t bpos, dpos, cp2;

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

1611}
1612
1613/*
1614 * Do an nfs rename rpc. Called from nfs_rename() and nfs_renameit().
1615 */
1616static int
1617nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc)
1618 register struct vnode *fdvp;
1617 char *fnameptr;
1619 const char *fnameptr;
1618 int fnamelen;
1619 register struct vnode *tdvp;
1620 int fnamelen;
1621 register struct vnode *tdvp;
1620 char *tnameptr;
1622 const char *tnameptr;
1621 int tnamelen;
1622 struct ucred *cred;
1623 struct proc *proc;
1624{
1625 register u_long *tl;
1626 register caddr_t cp;
1627 register long t1, t2;
1628 caddr_t bpos, dpos, cp2;

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

2443 * npp == NULL --> just do the lookup
2444 * *npp == NULL --> allocate a new nfsnode and make sure attributes are
2445 * handled too
2446 * *npp != NULL --> update the file handle in the vnode
2447 */
2448static int
2449nfs_lookitup(dvp, name, len, cred, procp, npp)
2450 register struct vnode *dvp;
1623 int tnamelen;
1624 struct ucred *cred;
1625 struct proc *proc;
1626{
1627 register u_long *tl;
1628 register caddr_t cp;
1629 register long t1, t2;
1630 caddr_t bpos, dpos, cp2;

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

2445 * npp == NULL --> just do the lookup
2446 * *npp == NULL --> allocate a new nfsnode and make sure attributes are
2447 * handled too
2448 * *npp != NULL --> update the file handle in the vnode
2449 */
2450static int
2451nfs_lookitup(dvp, name, len, cred, procp, npp)
2452 register struct vnode *dvp;
2451 char *name;
2453 const char *name;
2452 int len;
2453 struct ucred *cred;
2454 struct proc *procp;
2455 struct nfsnode **npp;
2456{
2457 register u_long *tl;
2458 register caddr_t cp;
2459 register long t1, t2;

--- 816 unchanged lines hidden ---
2454 int len;
2455 struct ucred *cred;
2456 struct proc *procp;
2457 struct nfsnode **npp;
2458{
2459 register u_long *tl;
2460 register caddr_t cp;
2461 register long t1, t2;

--- 816 unchanged lines hidden ---