Home | History | Annotate | Line # | Download | only in kern
vnode_if.c revision 1.112.6.1
      1  1.112.6.1   thorpej /*	$NetBSD: vnode_if.c,v 1.112.6.1 2021/08/01 22:42:39 thorpej Exp $	*/
      2        1.9   thorpej 
      3        1.1       cgd /*
      4       1.52     perry  * Warning: DO NOT EDIT! This file is automatically generated!
      5        1.1       cgd  * (Modifications made here may easily be lost!)
      6        1.1       cgd  *
      7        1.1       cgd  * Created from the file:
      8  1.112.6.1   thorpej  *	NetBSD: vnode_if.src,v 1.82 2021/07/02 16:56:22 dholland Exp
      9        1.1       cgd  * by the script:
     10  1.112.6.1   thorpej  *	NetBSD: vnode_if.sh,v 1.70 2020/05/16 18:31:50 christos Exp
     11        1.1       cgd  */
     12        1.1       cgd 
     13        1.1       cgd /*
     14       1.10      fvdl  * Copyright (c) 1992, 1993, 1994, 1995
     15        1.1       cgd  *	The Regents of the University of California.  All rights reserved.
     16        1.1       cgd  *
     17        1.1       cgd  * Redistribution and use in source and binary forms, with or without
     18        1.1       cgd  * modification, are permitted provided that the following conditions
     19        1.1       cgd  * are met:
     20        1.1       cgd  * 1. Redistributions of source code must retain the above copyright
     21        1.1       cgd  *    notice, this list of conditions and the following disclaimer.
     22        1.1       cgd  * 2. Redistributions in binary form must reproduce the above copyright
     23        1.1       cgd  *    notice, this list of conditions and the following disclaimer in the
     24        1.1       cgd  *    documentation and/or other materials provided with the distribution.
     25       1.45       agc  * 3. Neither the name of the University nor the names of its contributors
     26        1.1       cgd  *    may be used to endorse or promote products derived from this software
     27        1.1       cgd  *    without specific prior written permission.
     28        1.1       cgd  *
     29       1.14  christos  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     30        1.1       cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     31        1.1       cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     32        1.1       cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     33        1.1       cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     34        1.1       cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     35        1.1       cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     36        1.1       cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     37        1.1       cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     38        1.1       cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     39        1.1       cgd  * SUCH DAMAGE.
     40        1.1       cgd  */
     41       1.39     lukem 
     42       1.39     lukem #include <sys/cdefs.h>
     43  1.112.6.1   thorpej __KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.112.6.1 2021/08/01 22:42:39 thorpej Exp $");
     44       1.39     lukem 
     45        1.1       cgd #include <sys/param.h>
     46        1.1       cgd #include <sys/mount.h>
     47       1.23   thorpej #include <sys/buf.h>
     48        1.1       cgd #include <sys/vnode.h>
     49       1.72        ad #include <sys/lock.h>
     50       1.97   hannken #include <sys/fstrans.h>
     51        1.1       cgd 
     52      1.108   hannken enum fst_op { FST_NO, FST_YES, FST_LAZY, FST_TRY };
     53      1.105   hannken 
     54      1.105   hannken static inline int
     55      1.105   hannken vop_pre(vnode_t *vp, struct mount **mp, bool *mpsafe, enum fst_op op)
     56      1.105   hannken {
     57      1.105   hannken 	int error;
     58      1.105   hannken 
     59      1.105   hannken 	*mpsafe = (vp->v_vflag & VV_MPSAFE);
     60      1.105   hannken 
     61      1.105   hannken 	if (!*mpsafe) {
     62      1.105   hannken 		KERNEL_LOCK(1, curlwp);
     63      1.105   hannken 	}
     64      1.105   hannken 
     65      1.108   hannken 	if (op == FST_YES || op == FST_LAZY || op == FST_TRY) {
     66      1.105   hannken 		for (;;) {
     67      1.105   hannken 			*mp = vp->v_mount;
     68      1.105   hannken 			if (op == FST_TRY) {
     69      1.106   hannken 				error = fstrans_start_nowait(*mp);
     70      1.105   hannken 				if (error) {
     71      1.105   hannken 					if (!*mpsafe) {
     72      1.105   hannken 						KERNEL_UNLOCK_ONE(curlwp);
     73      1.105   hannken 					}
     74      1.105   hannken 					return error;
     75      1.105   hannken 				}
     76      1.108   hannken 			} else if (op == FST_LAZY) {
     77      1.108   hannken 				fstrans_start_lazy(*mp);
     78      1.105   hannken 			} else {
     79      1.106   hannken 				fstrans_start(*mp);
     80      1.105   hannken 			}
     81      1.105   hannken 			if (__predict_true(*mp == vp->v_mount))
     82      1.105   hannken 				break;
     83      1.105   hannken 			fstrans_done(*mp);
     84      1.105   hannken 		}
     85      1.105   hannken 	} else {
     86      1.105   hannken 		*mp = vp->v_mount;
     87      1.105   hannken 	}
     88      1.105   hannken 
     89      1.105   hannken 	return 0;
     90      1.105   hannken }
     91      1.105   hannken 
     92      1.105   hannken static inline void
     93      1.105   hannken vop_post(vnode_t *vp, struct mount *mp, bool mpsafe, enum fst_op op)
     94      1.105   hannken {
     95      1.105   hannken 
     96      1.108   hannken 	if (op == FST_YES || op == FST_LAZY) {
     97      1.105   hannken 		fstrans_done(mp);
     98      1.105   hannken 	}
     99      1.105   hannken 
    100      1.105   hannken 	if (!mpsafe) {
    101      1.105   hannken 		KERNEL_UNLOCK_ONE(curlwp);
    102      1.105   hannken 	}
    103      1.105   hannken }
    104      1.105   hannken 
    105       1.34     lukem const struct vnodeop_desc vop_default_desc = {
    106        1.1       cgd 	0,
    107        1.1       cgd 	"default",
    108        1.1       cgd 	0,
    109        1.1       cgd 	NULL,
    110        1.1       cgd 	VDESC_NO_OFFSET,
    111        1.1       cgd 	VDESC_NO_OFFSET,
    112        1.1       cgd 	VDESC_NO_OFFSET,
    113        1.1       cgd };
    114        1.1       cgd 
    115        1.1       cgd 
    116       1.33  jdolecek const int vop_bwrite_vp_offsets[] = {
    117       1.88   hannken 	VOPARG_OFFSETOF(struct vop_bwrite_args,a_vp),
    118       1.33  jdolecek 	VDESC_NO_OFFSET
    119       1.33  jdolecek };
    120       1.33  jdolecek const struct vnodeop_desc vop_bwrite_desc = {
    121       1.67     pooka 	VOP_BWRITE_DESCOFFSET,
    122       1.33  jdolecek 	"vop_bwrite",
    123       1.33  jdolecek 	0,
    124       1.33  jdolecek 	vop_bwrite_vp_offsets,
    125       1.33  jdolecek 	VDESC_NO_OFFSET,
    126       1.33  jdolecek 	VDESC_NO_OFFSET,
    127       1.33  jdolecek 	VDESC_NO_OFFSET,
    128       1.33  jdolecek };
    129       1.33  jdolecek int
    130       1.88   hannken VOP_BWRITE(struct vnode *vp,
    131       1.88   hannken     struct buf *bp)
    132       1.33  jdolecek {
    133       1.72        ad 	int error;
    134       1.72        ad 	bool mpsafe;
    135       1.33  jdolecek 	struct vop_bwrite_args a;
    136      1.105   hannken 	struct mount *mp;
    137       1.33  jdolecek 	a.a_desc = VDESC(vop_bwrite);
    138       1.88   hannken 	a.a_vp = vp;
    139       1.33  jdolecek 	a.a_bp = bp;
    140      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
    141      1.105   hannken 	if (error)
    142      1.105   hannken 		return error;
    143       1.88   hannken 	error = (VCALL(vp, VOFFSET(vop_bwrite), &a));
    144      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
    145       1.72        ad 	return error;
    146       1.33  jdolecek }
    147       1.33  jdolecek 
    148  1.112.6.1   thorpej const int vop_parsepath_vp_offsets[] = {
    149  1.112.6.1   thorpej 	VOPARG_OFFSETOF(struct vop_parsepath_args,a_dvp),
    150  1.112.6.1   thorpej 	VDESC_NO_OFFSET
    151  1.112.6.1   thorpej };
    152  1.112.6.1   thorpej const struct vnodeop_desc vop_parsepath_desc = {
    153  1.112.6.1   thorpej 	VOP_PARSEPATH_DESCOFFSET,
    154  1.112.6.1   thorpej 	"vop_parsepath",
    155  1.112.6.1   thorpej 	0,
    156  1.112.6.1   thorpej 	vop_parsepath_vp_offsets,
    157  1.112.6.1   thorpej 	VDESC_NO_OFFSET,
    158  1.112.6.1   thorpej 	VDESC_NO_OFFSET,
    159  1.112.6.1   thorpej 	VDESC_NO_OFFSET,
    160  1.112.6.1   thorpej };
    161  1.112.6.1   thorpej int
    162  1.112.6.1   thorpej VOP_PARSEPATH(struct vnode *dvp,
    163  1.112.6.1   thorpej     const char *name,
    164  1.112.6.1   thorpej     size_t *retval)
    165  1.112.6.1   thorpej {
    166  1.112.6.1   thorpej 	int error;
    167  1.112.6.1   thorpej 	bool mpsafe;
    168  1.112.6.1   thorpej 	struct vop_parsepath_args a;
    169  1.112.6.1   thorpej 	struct mount *mp;
    170  1.112.6.1   thorpej 	a.a_desc = VDESC(vop_parsepath);
    171  1.112.6.1   thorpej 	a.a_dvp = dvp;
    172  1.112.6.1   thorpej 	a.a_name = name;
    173  1.112.6.1   thorpej 	a.a_retval = retval;
    174  1.112.6.1   thorpej 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
    175  1.112.6.1   thorpej 	if (error)
    176  1.112.6.1   thorpej 		return error;
    177  1.112.6.1   thorpej 	error = (VCALL(dvp, VOFFSET(vop_parsepath), &a));
    178  1.112.6.1   thorpej 	vop_post(dvp, mp, mpsafe, FST_NO);
    179  1.112.6.1   thorpej 	return error;
    180  1.112.6.1   thorpej }
    181  1.112.6.1   thorpej 
    182       1.31  jdolecek const int vop_lookup_vp_offsets[] = {
    183       1.92   hannken 	VOPARG_OFFSETOF(struct vop_lookup_v2_args,a_dvp),
    184        1.1       cgd 	VDESC_NO_OFFSET
    185        1.1       cgd };
    186       1.33  jdolecek const struct vnodeop_desc vop_lookup_desc = {
    187       1.67     pooka 	VOP_LOOKUP_DESCOFFSET,
    188        1.1       cgd 	"vop_lookup",
    189        1.1       cgd 	0,
    190        1.1       cgd 	vop_lookup_vp_offsets,
    191       1.92   hannken 	VOPARG_OFFSETOF(struct vop_lookup_v2_args, a_vpp),
    192        1.1       cgd 	VDESC_NO_OFFSET,
    193       1.92   hannken 	VOPARG_OFFSETOF(struct vop_lookup_v2_args, a_cnp),
    194        1.1       cgd };
    195       1.23   thorpej int
    196       1.60   thorpej VOP_LOOKUP(struct vnode *dvp,
    197       1.60   thorpej     struct vnode **vpp,
    198       1.60   thorpej     struct componentname *cnp)
    199       1.23   thorpej {
    200       1.72        ad 	int error;
    201       1.72        ad 	bool mpsafe;
    202       1.92   hannken 	struct vop_lookup_v2_args a;
    203      1.105   hannken 	struct mount *mp;
    204       1.23   thorpej 	a.a_desc = VDESC(vop_lookup);
    205       1.23   thorpej 	a.a_dvp = dvp;
    206       1.23   thorpej 	a.a_vpp = vpp;
    207       1.23   thorpej 	a.a_cnp = cnp;
    208      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
    209      1.105   hannken 	if (error)
    210      1.105   hannken 		return error;
    211       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_lookup), &a));
    212      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
    213       1.69     pooka #ifdef DIAGNOSTIC
    214       1.72        ad 	if (error == 0)
    215       1.69     pooka 		KASSERT((*vpp)->v_size != VSIZENOTSET
    216       1.69     pooka 		    && (*vpp)->v_writesize != VSIZENOTSET);
    217       1.69     pooka #endif /* DIAGNOSTIC */
    218       1.72        ad 	return error;
    219       1.23   thorpej }
    220        1.1       cgd 
    221       1.31  jdolecek const int vop_create_vp_offsets[] = {
    222       1.91   hannken 	VOPARG_OFFSETOF(struct vop_create_v3_args,a_dvp),
    223        1.1       cgd 	VDESC_NO_OFFSET
    224        1.1       cgd };
    225       1.33  jdolecek const struct vnodeop_desc vop_create_desc = {
    226       1.67     pooka 	VOP_CREATE_DESCOFFSET,
    227        1.1       cgd 	"vop_create",
    228       1.90   hannken 	0,
    229        1.1       cgd 	vop_create_vp_offsets,
    230       1.91   hannken 	VOPARG_OFFSETOF(struct vop_create_v3_args, a_vpp),
    231        1.1       cgd 	VDESC_NO_OFFSET,
    232       1.91   hannken 	VOPARG_OFFSETOF(struct vop_create_v3_args, a_cnp),
    233        1.1       cgd };
    234       1.23   thorpej int
    235       1.60   thorpej VOP_CREATE(struct vnode *dvp,
    236       1.60   thorpej     struct vnode **vpp,
    237       1.60   thorpej     struct componentname *cnp,
    238       1.60   thorpej     struct vattr *vap)
    239       1.23   thorpej {
    240       1.72        ad 	int error;
    241       1.72        ad 	bool mpsafe;
    242       1.91   hannken 	struct vop_create_v3_args a;
    243      1.105   hannken 	struct mount *mp;
    244       1.23   thorpej 	a.a_desc = VDESC(vop_create);
    245       1.23   thorpej 	a.a_dvp = dvp;
    246       1.23   thorpej 	a.a_vpp = vpp;
    247       1.23   thorpej 	a.a_cnp = cnp;
    248       1.23   thorpej 	a.a_vap = vap;
    249      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
    250      1.105   hannken 	if (error)
    251      1.105   hannken 		return error;
    252       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_create), &a));
    253      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
    254       1.69     pooka #ifdef DIAGNOSTIC
    255       1.72        ad 	if (error == 0)
    256       1.69     pooka 		KASSERT((*vpp)->v_size != VSIZENOTSET
    257       1.69     pooka 		    && (*vpp)->v_writesize != VSIZENOTSET);
    258       1.69     pooka #endif /* DIAGNOSTIC */
    259       1.72        ad 	return error;
    260       1.23   thorpej }
    261        1.1       cgd 
    262       1.31  jdolecek const int vop_mknod_vp_offsets[] = {
    263       1.91   hannken 	VOPARG_OFFSETOF(struct vop_mknod_v3_args,a_dvp),
    264        1.1       cgd 	VDESC_NO_OFFSET
    265        1.1       cgd };
    266       1.33  jdolecek const struct vnodeop_desc vop_mknod_desc = {
    267       1.67     pooka 	VOP_MKNOD_DESCOFFSET,
    268        1.1       cgd 	"vop_mknod",
    269       1.90   hannken 	0,
    270        1.1       cgd 	vop_mknod_vp_offsets,
    271       1.91   hannken 	VOPARG_OFFSETOF(struct vop_mknod_v3_args, a_vpp),
    272        1.1       cgd 	VDESC_NO_OFFSET,
    273       1.91   hannken 	VOPARG_OFFSETOF(struct vop_mknod_v3_args, a_cnp),
    274        1.1       cgd };
    275       1.23   thorpej int
    276       1.60   thorpej VOP_MKNOD(struct vnode *dvp,
    277       1.60   thorpej     struct vnode **vpp,
    278       1.60   thorpej     struct componentname *cnp,
    279       1.60   thorpej     struct vattr *vap)
    280       1.23   thorpej {
    281       1.72        ad 	int error;
    282       1.72        ad 	bool mpsafe;
    283       1.91   hannken 	struct vop_mknod_v3_args a;
    284      1.105   hannken 	struct mount *mp;
    285       1.23   thorpej 	a.a_desc = VDESC(vop_mknod);
    286       1.23   thorpej 	a.a_dvp = dvp;
    287       1.23   thorpej 	a.a_vpp = vpp;
    288       1.23   thorpej 	a.a_cnp = cnp;
    289       1.23   thorpej 	a.a_vap = vap;
    290      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
    291      1.105   hannken 	if (error)
    292      1.105   hannken 		return error;
    293       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_mknod), &a));
    294      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
    295       1.69     pooka #ifdef DIAGNOSTIC
    296       1.72        ad 	if (error == 0)
    297       1.69     pooka 		KASSERT((*vpp)->v_size != VSIZENOTSET
    298       1.69     pooka 		    && (*vpp)->v_writesize != VSIZENOTSET);
    299       1.69     pooka #endif /* DIAGNOSTIC */
    300       1.72        ad 	return error;
    301       1.23   thorpej }
    302        1.1       cgd 
    303       1.31  jdolecek const int vop_open_vp_offsets[] = {
    304        1.1       cgd 	VOPARG_OFFSETOF(struct vop_open_args,a_vp),
    305        1.1       cgd 	VDESC_NO_OFFSET
    306        1.1       cgd };
    307       1.33  jdolecek const struct vnodeop_desc vop_open_desc = {
    308       1.67     pooka 	VOP_OPEN_DESCOFFSET,
    309        1.1       cgd 	"vop_open",
    310        1.1       cgd 	0,
    311        1.1       cgd 	vop_open_vp_offsets,
    312        1.1       cgd 	VDESC_NO_OFFSET,
    313        1.1       cgd 	VOPARG_OFFSETOF(struct vop_open_args, a_cred),
    314        1.1       cgd 	VDESC_NO_OFFSET,
    315        1.1       cgd };
    316       1.23   thorpej int
    317       1.60   thorpej VOP_OPEN(struct vnode *vp,
    318       1.60   thorpej     int mode,
    319       1.73     pooka     kauth_cred_t cred)
    320       1.23   thorpej {
    321       1.72        ad 	int error;
    322       1.72        ad 	bool mpsafe;
    323       1.23   thorpej 	struct vop_open_args a;
    324      1.105   hannken 	struct mount *mp;
    325       1.23   thorpej 	a.a_desc = VDESC(vop_open);
    326       1.23   thorpej 	a.a_vp = vp;
    327       1.23   thorpej 	a.a_mode = mode;
    328       1.23   thorpej 	a.a_cred = cred;
    329      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    330      1.105   hannken 	if (error)
    331      1.105   hannken 		return error;
    332       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_open), &a));
    333      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    334       1.72        ad 	return error;
    335       1.23   thorpej }
    336        1.1       cgd 
    337       1.31  jdolecek const int vop_close_vp_offsets[] = {
    338        1.1       cgd 	VOPARG_OFFSETOF(struct vop_close_args,a_vp),
    339        1.1       cgd 	VDESC_NO_OFFSET
    340        1.1       cgd };
    341       1.33  jdolecek const struct vnodeop_desc vop_close_desc = {
    342       1.67     pooka 	VOP_CLOSE_DESCOFFSET,
    343        1.1       cgd 	"vop_close",
    344        1.1       cgd 	0,
    345        1.1       cgd 	vop_close_vp_offsets,
    346        1.1       cgd 	VDESC_NO_OFFSET,
    347        1.1       cgd 	VOPARG_OFFSETOF(struct vop_close_args, a_cred),
    348        1.1       cgd 	VDESC_NO_OFFSET,
    349        1.1       cgd };
    350       1.23   thorpej int
    351       1.60   thorpej VOP_CLOSE(struct vnode *vp,
    352       1.60   thorpej     int fflag,
    353       1.73     pooka     kauth_cred_t cred)
    354       1.23   thorpej {
    355       1.72        ad 	int error;
    356       1.72        ad 	bool mpsafe;
    357       1.23   thorpej 	struct vop_close_args a;
    358      1.105   hannken 	struct mount *mp;
    359       1.23   thorpej 	a.a_desc = VDESC(vop_close);
    360       1.23   thorpej 	a.a_vp = vp;
    361       1.23   thorpej 	a.a_fflag = fflag;
    362       1.23   thorpej 	a.a_cred = cred;
    363      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    364      1.105   hannken 	if (error)
    365      1.105   hannken 		return error;
    366       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_close), &a));
    367      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    368       1.72        ad 	return error;
    369       1.23   thorpej }
    370        1.1       cgd 
    371       1.31  jdolecek const int vop_access_vp_offsets[] = {
    372        1.1       cgd 	VOPARG_OFFSETOF(struct vop_access_args,a_vp),
    373        1.1       cgd 	VDESC_NO_OFFSET
    374        1.1       cgd };
    375       1.33  jdolecek const struct vnodeop_desc vop_access_desc = {
    376       1.67     pooka 	VOP_ACCESS_DESCOFFSET,
    377        1.1       cgd 	"vop_access",
    378        1.1       cgd 	0,
    379        1.1       cgd 	vop_access_vp_offsets,
    380        1.1       cgd 	VDESC_NO_OFFSET,
    381        1.1       cgd 	VOPARG_OFFSETOF(struct vop_access_args, a_cred),
    382        1.1       cgd 	VDESC_NO_OFFSET,
    383        1.1       cgd };
    384       1.23   thorpej int
    385       1.60   thorpej VOP_ACCESS(struct vnode *vp,
    386      1.111  christos     accmode_t accmode,
    387       1.73     pooka     kauth_cred_t cred)
    388       1.23   thorpej {
    389       1.72        ad 	int error;
    390       1.72        ad 	bool mpsafe;
    391       1.23   thorpej 	struct vop_access_args a;
    392      1.105   hannken 	struct mount *mp;
    393       1.23   thorpej 	a.a_desc = VDESC(vop_access);
    394       1.23   thorpej 	a.a_vp = vp;
    395      1.111  christos 	a.a_accmode = accmode;
    396       1.23   thorpej 	a.a_cred = cred;
    397      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    398      1.105   hannken 	if (error)
    399      1.105   hannken 		return error;
    400       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_access), &a));
    401      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    402       1.72        ad 	return error;
    403       1.23   thorpej }
    404        1.1       cgd 
    405      1.111  christos const int vop_accessx_vp_offsets[] = {
    406      1.111  christos 	VOPARG_OFFSETOF(struct vop_accessx_args,a_vp),
    407      1.111  christos 	VDESC_NO_OFFSET
    408      1.111  christos };
    409      1.111  christos const struct vnodeop_desc vop_accessx_desc = {
    410      1.111  christos 	VOP_ACCESSX_DESCOFFSET,
    411      1.111  christos 	"vop_accessx",
    412      1.111  christos 	0,
    413      1.111  christos 	vop_accessx_vp_offsets,
    414      1.111  christos 	VDESC_NO_OFFSET,
    415      1.111  christos 	VOPARG_OFFSETOF(struct vop_accessx_args, a_cred),
    416      1.111  christos 	VDESC_NO_OFFSET,
    417      1.111  christos };
    418      1.111  christos int
    419      1.111  christos VOP_ACCESSX(struct vnode *vp,
    420      1.111  christos     accmode_t accmode,
    421      1.111  christos     kauth_cred_t cred)
    422      1.111  christos {
    423      1.111  christos 	int error;
    424      1.111  christos 	bool mpsafe;
    425      1.111  christos 	struct vop_accessx_args a;
    426      1.111  christos 	struct mount *mp;
    427      1.111  christos 	a.a_desc = VDESC(vop_accessx);
    428      1.111  christos 	a.a_vp = vp;
    429      1.111  christos 	a.a_accmode = accmode;
    430      1.111  christos 	a.a_cred = cred;
    431      1.111  christos 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    432      1.111  christos 	if (error)
    433      1.111  christos 		return error;
    434      1.111  christos 	error = (VCALL(vp, VOFFSET(vop_accessx), &a));
    435      1.111  christos 	vop_post(vp, mp, mpsafe, FST_NO);
    436      1.111  christos 	return error;
    437      1.111  christos }
    438      1.111  christos 
    439       1.31  jdolecek const int vop_getattr_vp_offsets[] = {
    440        1.1       cgd 	VOPARG_OFFSETOF(struct vop_getattr_args,a_vp),
    441        1.1       cgd 	VDESC_NO_OFFSET
    442        1.1       cgd };
    443       1.33  jdolecek const struct vnodeop_desc vop_getattr_desc = {
    444       1.67     pooka 	VOP_GETATTR_DESCOFFSET,
    445        1.1       cgd 	"vop_getattr",
    446        1.1       cgd 	0,
    447        1.1       cgd 	vop_getattr_vp_offsets,
    448        1.1       cgd 	VDESC_NO_OFFSET,
    449        1.1       cgd 	VOPARG_OFFSETOF(struct vop_getattr_args, a_cred),
    450        1.1       cgd 	VDESC_NO_OFFSET,
    451        1.1       cgd };
    452       1.23   thorpej int
    453       1.60   thorpej VOP_GETATTR(struct vnode *vp,
    454       1.60   thorpej     struct vattr *vap,
    455       1.73     pooka     kauth_cred_t cred)
    456       1.23   thorpej {
    457       1.72        ad 	int error;
    458       1.72        ad 	bool mpsafe;
    459       1.23   thorpej 	struct vop_getattr_args a;
    460      1.105   hannken 	struct mount *mp;
    461       1.23   thorpej 	a.a_desc = VDESC(vop_getattr);
    462       1.23   thorpej 	a.a_vp = vp;
    463       1.23   thorpej 	a.a_vap = vap;
    464       1.23   thorpej 	a.a_cred = cred;
    465      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    466      1.105   hannken 	if (error)
    467      1.105   hannken 		return error;
    468       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_getattr), &a));
    469      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    470       1.72        ad 	return error;
    471       1.23   thorpej }
    472        1.1       cgd 
    473       1.31  jdolecek const int vop_setattr_vp_offsets[] = {
    474        1.1       cgd 	VOPARG_OFFSETOF(struct vop_setattr_args,a_vp),
    475        1.1       cgd 	VDESC_NO_OFFSET
    476        1.1       cgd };
    477       1.33  jdolecek const struct vnodeop_desc vop_setattr_desc = {
    478       1.67     pooka 	VOP_SETATTR_DESCOFFSET,
    479        1.1       cgd 	"vop_setattr",
    480        1.1       cgd 	0,
    481        1.1       cgd 	vop_setattr_vp_offsets,
    482        1.1       cgd 	VDESC_NO_OFFSET,
    483        1.1       cgd 	VOPARG_OFFSETOF(struct vop_setattr_args, a_cred),
    484        1.1       cgd 	VDESC_NO_OFFSET,
    485        1.1       cgd };
    486       1.23   thorpej int
    487       1.60   thorpej VOP_SETATTR(struct vnode *vp,
    488       1.60   thorpej     struct vattr *vap,
    489       1.73     pooka     kauth_cred_t cred)
    490       1.23   thorpej {
    491       1.72        ad 	int error;
    492       1.72        ad 	bool mpsafe;
    493       1.23   thorpej 	struct vop_setattr_args a;
    494      1.105   hannken 	struct mount *mp;
    495       1.23   thorpej 	a.a_desc = VDESC(vop_setattr);
    496       1.23   thorpej 	a.a_vp = vp;
    497       1.23   thorpej 	a.a_vap = vap;
    498       1.23   thorpej 	a.a_cred = cred;
    499      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    500      1.105   hannken 	if (error)
    501      1.105   hannken 		return error;
    502       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_setattr), &a));
    503      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    504       1.72        ad 	return error;
    505       1.23   thorpej }
    506        1.1       cgd 
    507       1.31  jdolecek const int vop_read_vp_offsets[] = {
    508        1.1       cgd 	VOPARG_OFFSETOF(struct vop_read_args,a_vp),
    509        1.1       cgd 	VDESC_NO_OFFSET
    510        1.1       cgd };
    511       1.33  jdolecek const struct vnodeop_desc vop_read_desc = {
    512       1.67     pooka 	VOP_READ_DESCOFFSET,
    513        1.1       cgd 	"vop_read",
    514        1.1       cgd 	0,
    515        1.1       cgd 	vop_read_vp_offsets,
    516        1.1       cgd 	VDESC_NO_OFFSET,
    517        1.1       cgd 	VOPARG_OFFSETOF(struct vop_read_args, a_cred),
    518        1.1       cgd 	VDESC_NO_OFFSET,
    519        1.1       cgd };
    520       1.23   thorpej int
    521       1.60   thorpej VOP_READ(struct vnode *vp,
    522       1.60   thorpej     struct uio *uio,
    523       1.60   thorpej     int ioflag,
    524       1.65      elad     kauth_cred_t cred)
    525       1.23   thorpej {
    526       1.72        ad 	int error;
    527       1.72        ad 	bool mpsafe;
    528       1.23   thorpej 	struct vop_read_args a;
    529      1.105   hannken 	struct mount *mp;
    530       1.23   thorpej 	a.a_desc = VDESC(vop_read);
    531       1.23   thorpej 	a.a_vp = vp;
    532       1.23   thorpej 	a.a_uio = uio;
    533       1.23   thorpej 	a.a_ioflag = ioflag;
    534       1.23   thorpej 	a.a_cred = cred;
    535      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    536      1.105   hannken 	if (error)
    537      1.105   hannken 		return error;
    538       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_read), &a));
    539      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    540       1.72        ad 	return error;
    541       1.23   thorpej }
    542        1.1       cgd 
    543       1.31  jdolecek const int vop_write_vp_offsets[] = {
    544        1.1       cgd 	VOPARG_OFFSETOF(struct vop_write_args,a_vp),
    545        1.1       cgd 	VDESC_NO_OFFSET
    546        1.1       cgd };
    547       1.33  jdolecek const struct vnodeop_desc vop_write_desc = {
    548       1.67     pooka 	VOP_WRITE_DESCOFFSET,
    549        1.1       cgd 	"vop_write",
    550        1.1       cgd 	0,
    551        1.1       cgd 	vop_write_vp_offsets,
    552        1.1       cgd 	VDESC_NO_OFFSET,
    553        1.1       cgd 	VOPARG_OFFSETOF(struct vop_write_args, a_cred),
    554        1.1       cgd 	VDESC_NO_OFFSET,
    555        1.1       cgd };
    556       1.23   thorpej int
    557       1.60   thorpej VOP_WRITE(struct vnode *vp,
    558       1.60   thorpej     struct uio *uio,
    559       1.60   thorpej     int ioflag,
    560       1.65      elad     kauth_cred_t cred)
    561       1.23   thorpej {
    562       1.72        ad 	int error;
    563       1.72        ad 	bool mpsafe;
    564       1.23   thorpej 	struct vop_write_args a;
    565      1.105   hannken 	struct mount *mp;
    566       1.23   thorpej 	a.a_desc = VDESC(vop_write);
    567       1.23   thorpej 	a.a_vp = vp;
    568       1.23   thorpej 	a.a_uio = uio;
    569       1.23   thorpej 	a.a_ioflag = ioflag;
    570       1.23   thorpej 	a.a_cred = cred;
    571      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    572      1.105   hannken 	if (error)
    573      1.105   hannken 		return error;
    574       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_write), &a));
    575      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    576       1.72        ad 	return error;
    577       1.23   thorpej }
    578        1.1       cgd 
    579       1.93  dholland const int vop_fallocate_vp_offsets[] = {
    580       1.93  dholland 	VOPARG_OFFSETOF(struct vop_fallocate_args,a_vp),
    581       1.93  dholland 	VDESC_NO_OFFSET
    582       1.93  dholland };
    583       1.93  dholland const struct vnodeop_desc vop_fallocate_desc = {
    584       1.93  dholland 	VOP_FALLOCATE_DESCOFFSET,
    585       1.93  dholland 	"vop_fallocate",
    586       1.93  dholland 	0,
    587       1.93  dholland 	vop_fallocate_vp_offsets,
    588       1.93  dholland 	VDESC_NO_OFFSET,
    589       1.93  dholland 	VDESC_NO_OFFSET,
    590       1.93  dholland 	VDESC_NO_OFFSET,
    591       1.93  dholland };
    592       1.93  dholland int
    593       1.93  dholland VOP_FALLOCATE(struct vnode *vp,
    594       1.93  dholland     off_t pos,
    595       1.93  dholland     off_t len)
    596       1.93  dholland {
    597       1.93  dholland 	int error;
    598       1.93  dholland 	bool mpsafe;
    599       1.93  dholland 	struct vop_fallocate_args a;
    600      1.105   hannken 	struct mount *mp;
    601       1.93  dholland 	a.a_desc = VDESC(vop_fallocate);
    602       1.93  dholland 	a.a_vp = vp;
    603       1.93  dholland 	a.a_pos = pos;
    604       1.93  dholland 	a.a_len = len;
    605      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    606      1.105   hannken 	if (error)
    607      1.105   hannken 		return error;
    608       1.93  dholland 	error = (VCALL(vp, VOFFSET(vop_fallocate), &a));
    609      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    610       1.93  dholland 	return error;
    611       1.93  dholland }
    612       1.93  dholland 
    613       1.93  dholland const int vop_fdiscard_vp_offsets[] = {
    614       1.93  dholland 	VOPARG_OFFSETOF(struct vop_fdiscard_args,a_vp),
    615       1.93  dholland 	VDESC_NO_OFFSET
    616       1.93  dholland };
    617       1.93  dholland const struct vnodeop_desc vop_fdiscard_desc = {
    618       1.93  dholland 	VOP_FDISCARD_DESCOFFSET,
    619       1.93  dholland 	"vop_fdiscard",
    620       1.93  dholland 	0,
    621       1.93  dholland 	vop_fdiscard_vp_offsets,
    622       1.93  dholland 	VDESC_NO_OFFSET,
    623       1.93  dholland 	VDESC_NO_OFFSET,
    624       1.93  dholland 	VDESC_NO_OFFSET,
    625       1.93  dholland };
    626       1.93  dholland int
    627       1.93  dholland VOP_FDISCARD(struct vnode *vp,
    628       1.93  dholland     off_t pos,
    629       1.93  dholland     off_t len)
    630       1.93  dholland {
    631       1.93  dholland 	int error;
    632       1.93  dholland 	bool mpsafe;
    633       1.93  dholland 	struct vop_fdiscard_args a;
    634      1.105   hannken 	struct mount *mp;
    635       1.93  dholland 	a.a_desc = VDESC(vop_fdiscard);
    636       1.93  dholland 	a.a_vp = vp;
    637       1.93  dholland 	a.a_pos = pos;
    638       1.93  dholland 	a.a_len = len;
    639      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    640      1.105   hannken 	if (error)
    641      1.105   hannken 		return error;
    642       1.93  dholland 	error = (VCALL(vp, VOFFSET(vop_fdiscard), &a));
    643      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    644       1.93  dholland 	return error;
    645       1.93  dholland }
    646       1.93  dholland 
    647       1.31  jdolecek const int vop_ioctl_vp_offsets[] = {
    648        1.1       cgd 	VOPARG_OFFSETOF(struct vop_ioctl_args,a_vp),
    649        1.1       cgd 	VDESC_NO_OFFSET
    650        1.1       cgd };
    651       1.33  jdolecek const struct vnodeop_desc vop_ioctl_desc = {
    652       1.67     pooka 	VOP_IOCTL_DESCOFFSET,
    653        1.1       cgd 	"vop_ioctl",
    654        1.1       cgd 	0,
    655        1.1       cgd 	vop_ioctl_vp_offsets,
    656        1.1       cgd 	VDESC_NO_OFFSET,
    657        1.1       cgd 	VOPARG_OFFSETOF(struct vop_ioctl_args, a_cred),
    658        1.1       cgd 	VDESC_NO_OFFSET,
    659        1.1       cgd };
    660       1.23   thorpej int
    661       1.60   thorpej VOP_IOCTL(struct vnode *vp,
    662       1.60   thorpej     u_long command,
    663       1.60   thorpej     void *data,
    664       1.60   thorpej     int fflag,
    665       1.73     pooka     kauth_cred_t cred)
    666       1.23   thorpej {
    667       1.72        ad 	int error;
    668       1.72        ad 	bool mpsafe;
    669       1.23   thorpej 	struct vop_ioctl_args a;
    670      1.105   hannken 	struct mount *mp;
    671       1.23   thorpej 	a.a_desc = VDESC(vop_ioctl);
    672       1.23   thorpej 	a.a_vp = vp;
    673       1.23   thorpej 	a.a_command = command;
    674       1.23   thorpej 	a.a_data = data;
    675       1.23   thorpej 	a.a_fflag = fflag;
    676       1.23   thorpej 	a.a_cred = cred;
    677      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    678      1.105   hannken 	if (error)
    679      1.105   hannken 		return error;
    680       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_ioctl), &a));
    681      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    682       1.72        ad 	return error;
    683       1.23   thorpej }
    684        1.1       cgd 
    685       1.31  jdolecek const int vop_fcntl_vp_offsets[] = {
    686       1.18  wrstuden 	VOPARG_OFFSETOF(struct vop_fcntl_args,a_vp),
    687       1.18  wrstuden 	VDESC_NO_OFFSET
    688       1.18  wrstuden };
    689       1.33  jdolecek const struct vnodeop_desc vop_fcntl_desc = {
    690       1.67     pooka 	VOP_FCNTL_DESCOFFSET,
    691       1.18  wrstuden 	"vop_fcntl",
    692       1.18  wrstuden 	0,
    693       1.18  wrstuden 	vop_fcntl_vp_offsets,
    694       1.18  wrstuden 	VDESC_NO_OFFSET,
    695       1.18  wrstuden 	VOPARG_OFFSETOF(struct vop_fcntl_args, a_cred),
    696       1.18  wrstuden 	VDESC_NO_OFFSET,
    697       1.18  wrstuden };
    698       1.23   thorpej int
    699       1.60   thorpej VOP_FCNTL(struct vnode *vp,
    700       1.60   thorpej     u_int command,
    701       1.60   thorpej     void *data,
    702       1.60   thorpej     int fflag,
    703       1.73     pooka     kauth_cred_t cred)
    704       1.23   thorpej {
    705       1.72        ad 	int error;
    706       1.72        ad 	bool mpsafe;
    707       1.23   thorpej 	struct vop_fcntl_args a;
    708      1.105   hannken 	struct mount *mp;
    709       1.23   thorpej 	a.a_desc = VDESC(vop_fcntl);
    710       1.23   thorpej 	a.a_vp = vp;
    711       1.23   thorpej 	a.a_command = command;
    712       1.23   thorpej 	a.a_data = data;
    713       1.23   thorpej 	a.a_fflag = fflag;
    714       1.23   thorpej 	a.a_cred = cred;
    715      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    716      1.105   hannken 	if (error)
    717      1.105   hannken 		return error;
    718       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_fcntl), &a));
    719      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    720       1.72        ad 	return error;
    721       1.23   thorpej }
    722       1.18  wrstuden 
    723       1.31  jdolecek const int vop_poll_vp_offsets[] = {
    724        1.3   mycroft 	VOPARG_OFFSETOF(struct vop_poll_args,a_vp),
    725        1.1       cgd 	VDESC_NO_OFFSET
    726        1.1       cgd };
    727       1.33  jdolecek const struct vnodeop_desc vop_poll_desc = {
    728       1.67     pooka 	VOP_POLL_DESCOFFSET,
    729        1.3   mycroft 	"vop_poll",
    730        1.1       cgd 	0,
    731        1.3   mycroft 	vop_poll_vp_offsets,
    732        1.1       cgd 	VDESC_NO_OFFSET,
    733        1.3   mycroft 	VDESC_NO_OFFSET,
    734        1.1       cgd 	VDESC_NO_OFFSET,
    735        1.1       cgd };
    736       1.23   thorpej int
    737       1.60   thorpej VOP_POLL(struct vnode *vp,
    738       1.73     pooka     int events)
    739       1.23   thorpej {
    740       1.72        ad 	int error;
    741       1.72        ad 	bool mpsafe;
    742       1.23   thorpej 	struct vop_poll_args a;
    743      1.105   hannken 	struct mount *mp;
    744       1.23   thorpej 	a.a_desc = VDESC(vop_poll);
    745       1.23   thorpej 	a.a_vp = vp;
    746       1.23   thorpej 	a.a_events = events;
    747      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
    748      1.105   hannken 	if (error)
    749      1.105   hannken 		return error;
    750       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_poll), &a));
    751      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
    752       1.72        ad 	return error;
    753       1.23   thorpej }
    754        1.1       cgd 
    755       1.40  jdolecek const int vop_kqfilter_vp_offsets[] = {
    756       1.40  jdolecek 	VOPARG_OFFSETOF(struct vop_kqfilter_args,a_vp),
    757       1.40  jdolecek 	VDESC_NO_OFFSET
    758       1.40  jdolecek };
    759       1.40  jdolecek const struct vnodeop_desc vop_kqfilter_desc = {
    760       1.67     pooka 	VOP_KQFILTER_DESCOFFSET,
    761       1.40  jdolecek 	"vop_kqfilter",
    762       1.40  jdolecek 	0,
    763       1.40  jdolecek 	vop_kqfilter_vp_offsets,
    764       1.40  jdolecek 	VDESC_NO_OFFSET,
    765       1.40  jdolecek 	VDESC_NO_OFFSET,
    766       1.40  jdolecek 	VDESC_NO_OFFSET,
    767       1.40  jdolecek };
    768       1.40  jdolecek int
    769       1.60   thorpej VOP_KQFILTER(struct vnode *vp,
    770       1.60   thorpej     struct knote *kn)
    771       1.40  jdolecek {
    772       1.72        ad 	int error;
    773       1.72        ad 	bool mpsafe;
    774       1.40  jdolecek 	struct vop_kqfilter_args a;
    775      1.105   hannken 	struct mount *mp;
    776       1.40  jdolecek 	a.a_desc = VDESC(vop_kqfilter);
    777       1.40  jdolecek 	a.a_vp = vp;
    778       1.40  jdolecek 	a.a_kn = kn;
    779      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
    780      1.105   hannken 	if (error)
    781      1.105   hannken 		return error;
    782       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_kqfilter), &a));
    783      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
    784       1.72        ad 	return error;
    785       1.40  jdolecek }
    786       1.40  jdolecek 
    787       1.31  jdolecek const int vop_revoke_vp_offsets[] = {
    788       1.10      fvdl 	VOPARG_OFFSETOF(struct vop_revoke_args,a_vp),
    789       1.10      fvdl 	VDESC_NO_OFFSET
    790       1.10      fvdl };
    791       1.33  jdolecek const struct vnodeop_desc vop_revoke_desc = {
    792       1.67     pooka 	VOP_REVOKE_DESCOFFSET,
    793       1.10      fvdl 	"vop_revoke",
    794       1.10      fvdl 	0,
    795       1.10      fvdl 	vop_revoke_vp_offsets,
    796       1.10      fvdl 	VDESC_NO_OFFSET,
    797       1.10      fvdl 	VDESC_NO_OFFSET,
    798       1.10      fvdl 	VDESC_NO_OFFSET,
    799       1.10      fvdl };
    800       1.23   thorpej int
    801       1.60   thorpej VOP_REVOKE(struct vnode *vp,
    802       1.60   thorpej     int flags)
    803       1.23   thorpej {
    804       1.72        ad 	int error;
    805       1.72        ad 	bool mpsafe;
    806       1.23   thorpej 	struct vop_revoke_args a;
    807      1.105   hannken 	struct mount *mp;
    808       1.23   thorpej 	a.a_desc = VDESC(vop_revoke);
    809       1.23   thorpej 	a.a_vp = vp;
    810       1.23   thorpej 	a.a_flags = flags;
    811      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    812      1.105   hannken 	if (error)
    813      1.105   hannken 		return error;
    814       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_revoke), &a));
    815      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    816       1.72        ad 	return error;
    817       1.23   thorpej }
    818       1.10      fvdl 
    819       1.31  jdolecek const int vop_mmap_vp_offsets[] = {
    820        1.1       cgd 	VOPARG_OFFSETOF(struct vop_mmap_args,a_vp),
    821        1.1       cgd 	VDESC_NO_OFFSET
    822        1.1       cgd };
    823       1.33  jdolecek const struct vnodeop_desc vop_mmap_desc = {
    824       1.67     pooka 	VOP_MMAP_DESCOFFSET,
    825        1.1       cgd 	"vop_mmap",
    826        1.1       cgd 	0,
    827        1.1       cgd 	vop_mmap_vp_offsets,
    828        1.1       cgd 	VDESC_NO_OFFSET,
    829        1.1       cgd 	VOPARG_OFFSETOF(struct vop_mmap_args, a_cred),
    830        1.1       cgd 	VDESC_NO_OFFSET,
    831        1.1       cgd };
    832       1.23   thorpej int
    833       1.60   thorpej VOP_MMAP(struct vnode *vp,
    834       1.70     pooka     vm_prot_t prot,
    835       1.73     pooka     kauth_cred_t cred)
    836       1.23   thorpej {
    837       1.72        ad 	int error;
    838       1.72        ad 	bool mpsafe;
    839       1.23   thorpej 	struct vop_mmap_args a;
    840      1.105   hannken 	struct mount *mp;
    841       1.23   thorpej 	a.a_desc = VDESC(vop_mmap);
    842       1.23   thorpej 	a.a_vp = vp;
    843       1.70     pooka 	a.a_prot = prot;
    844       1.23   thorpej 	a.a_cred = cred;
    845      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
    846      1.105   hannken 	if (error)
    847      1.105   hannken 		return error;
    848       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_mmap), &a));
    849      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
    850       1.72        ad 	return error;
    851       1.23   thorpej }
    852        1.1       cgd 
    853       1.31  jdolecek const int vop_fsync_vp_offsets[] = {
    854        1.1       cgd 	VOPARG_OFFSETOF(struct vop_fsync_args,a_vp),
    855        1.1       cgd 	VDESC_NO_OFFSET
    856        1.1       cgd };
    857       1.33  jdolecek const struct vnodeop_desc vop_fsync_desc = {
    858       1.67     pooka 	VOP_FSYNC_DESCOFFSET,
    859        1.1       cgd 	"vop_fsync",
    860        1.1       cgd 	0,
    861        1.1       cgd 	vop_fsync_vp_offsets,
    862        1.1       cgd 	VDESC_NO_OFFSET,
    863        1.1       cgd 	VOPARG_OFFSETOF(struct vop_fsync_args, a_cred),
    864        1.1       cgd 	VDESC_NO_OFFSET,
    865        1.1       cgd };
    866       1.23   thorpej int
    867       1.60   thorpej VOP_FSYNC(struct vnode *vp,
    868       1.65      elad     kauth_cred_t cred,
    869       1.60   thorpej     int flags,
    870       1.60   thorpej     off_t offlo,
    871       1.73     pooka     off_t offhi)
    872       1.23   thorpej {
    873       1.72        ad 	int error;
    874       1.72        ad 	bool mpsafe;
    875       1.23   thorpej 	struct vop_fsync_args a;
    876      1.105   hannken 	struct mount *mp;
    877       1.23   thorpej 	a.a_desc = VDESC(vop_fsync);
    878       1.23   thorpej 	a.a_vp = vp;
    879       1.23   thorpej 	a.a_cred = cred;
    880       1.23   thorpej 	a.a_flags = flags;
    881       1.25      fvdl 	a.a_offlo = offlo;
    882       1.25      fvdl 	a.a_offhi = offhi;
    883      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
    884      1.105   hannken 	if (error)
    885      1.105   hannken 		return error;
    886       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_fsync), &a));
    887      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
    888       1.72        ad 	return error;
    889       1.23   thorpej }
    890        1.1       cgd 
    891       1.31  jdolecek const int vop_seek_vp_offsets[] = {
    892        1.1       cgd 	VOPARG_OFFSETOF(struct vop_seek_args,a_vp),
    893        1.1       cgd 	VDESC_NO_OFFSET
    894        1.1       cgd };
    895       1.33  jdolecek const struct vnodeop_desc vop_seek_desc = {
    896       1.67     pooka 	VOP_SEEK_DESCOFFSET,
    897        1.1       cgd 	"vop_seek",
    898        1.1       cgd 	0,
    899        1.1       cgd 	vop_seek_vp_offsets,
    900        1.1       cgd 	VDESC_NO_OFFSET,
    901        1.1       cgd 	VOPARG_OFFSETOF(struct vop_seek_args, a_cred),
    902        1.1       cgd 	VDESC_NO_OFFSET,
    903        1.1       cgd };
    904       1.23   thorpej int
    905       1.60   thorpej VOP_SEEK(struct vnode *vp,
    906       1.60   thorpej     off_t oldoff,
    907       1.60   thorpej     off_t newoff,
    908       1.65      elad     kauth_cred_t cred)
    909       1.23   thorpej {
    910       1.72        ad 	int error;
    911       1.72        ad 	bool mpsafe;
    912       1.23   thorpej 	struct vop_seek_args a;
    913      1.105   hannken 	struct mount *mp;
    914       1.23   thorpej 	a.a_desc = VDESC(vop_seek);
    915       1.23   thorpej 	a.a_vp = vp;
    916       1.23   thorpej 	a.a_oldoff = oldoff;
    917       1.23   thorpej 	a.a_newoff = newoff;
    918       1.23   thorpej 	a.a_cred = cred;
    919      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
    920      1.105   hannken 	if (error)
    921      1.105   hannken 		return error;
    922       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_seek), &a));
    923      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
    924       1.72        ad 	return error;
    925       1.23   thorpej }
    926        1.1       cgd 
    927       1.31  jdolecek const int vop_remove_vp_offsets[] = {
    928      1.103  riastrad 	VOPARG_OFFSETOF(struct vop_remove_v2_args,a_dvp),
    929      1.103  riastrad 	VOPARG_OFFSETOF(struct vop_remove_v2_args,a_vp),
    930        1.1       cgd 	VDESC_NO_OFFSET
    931        1.1       cgd };
    932       1.33  jdolecek const struct vnodeop_desc vop_remove_desc = {
    933       1.67     pooka 	VOP_REMOVE_DESCOFFSET,
    934        1.1       cgd 	"vop_remove",
    935      1.103  riastrad 	0 | VDESC_VP1_WILLPUT,
    936        1.1       cgd 	vop_remove_vp_offsets,
    937        1.1       cgd 	VDESC_NO_OFFSET,
    938        1.1       cgd 	VDESC_NO_OFFSET,
    939      1.103  riastrad 	VOPARG_OFFSETOF(struct vop_remove_v2_args, a_cnp),
    940        1.1       cgd };
    941       1.23   thorpej int
    942       1.60   thorpej VOP_REMOVE(struct vnode *dvp,
    943       1.60   thorpej     struct vnode *vp,
    944       1.60   thorpej     struct componentname *cnp)
    945       1.23   thorpej {
    946       1.72        ad 	int error;
    947       1.72        ad 	bool mpsafe;
    948      1.103  riastrad 	struct vop_remove_v2_args a;
    949      1.105   hannken 	struct mount *mp;
    950       1.23   thorpej 	a.a_desc = VDESC(vop_remove);
    951       1.23   thorpej 	a.a_dvp = dvp;
    952       1.81     pooka 	a.a_vp = vp;
    953       1.23   thorpej 	a.a_cnp = cnp;
    954      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
    955      1.105   hannken 	if (error)
    956      1.105   hannken 		return error;
    957       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_remove), &a));
    958      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
    959       1.72        ad 	return error;
    960       1.23   thorpej }
    961        1.1       cgd 
    962       1.31  jdolecek const int vop_link_vp_offsets[] = {
    963       1.94  riastrad 	VOPARG_OFFSETOF(struct vop_link_v2_args,a_dvp),
    964       1.94  riastrad 	VOPARG_OFFSETOF(struct vop_link_v2_args,a_vp),
    965        1.1       cgd 	VDESC_NO_OFFSET
    966        1.1       cgd };
    967       1.33  jdolecek const struct vnodeop_desc vop_link_desc = {
    968       1.67     pooka 	VOP_LINK_DESCOFFSET,
    969        1.1       cgd 	"vop_link",
    970       1.94  riastrad 	0,
    971        1.1       cgd 	vop_link_vp_offsets,
    972        1.1       cgd 	VDESC_NO_OFFSET,
    973        1.1       cgd 	VDESC_NO_OFFSET,
    974       1.94  riastrad 	VOPARG_OFFSETOF(struct vop_link_v2_args, a_cnp),
    975        1.1       cgd };
    976       1.23   thorpej int
    977       1.60   thorpej VOP_LINK(struct vnode *dvp,
    978       1.60   thorpej     struct vnode *vp,
    979       1.60   thorpej     struct componentname *cnp)
    980       1.23   thorpej {
    981       1.72        ad 	int error;
    982       1.72        ad 	bool mpsafe;
    983       1.94  riastrad 	struct vop_link_v2_args a;
    984      1.105   hannken 	struct mount *mp;
    985       1.23   thorpej 	a.a_desc = VDESC(vop_link);
    986       1.23   thorpej 	a.a_dvp = dvp;
    987       1.81     pooka 	a.a_vp = vp;
    988       1.23   thorpej 	a.a_cnp = cnp;
    989      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
    990      1.105   hannken 	if (error)
    991      1.105   hannken 		return error;
    992       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_link), &a));
    993      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
    994       1.72        ad 	return error;
    995       1.23   thorpej }
    996        1.1       cgd 
    997       1.31  jdolecek const int vop_rename_vp_offsets[] = {
    998        1.1       cgd 	VOPARG_OFFSETOF(struct vop_rename_args,a_fdvp),
    999        1.1       cgd 	VOPARG_OFFSETOF(struct vop_rename_args,a_fvp),
   1000        1.1       cgd 	VOPARG_OFFSETOF(struct vop_rename_args,a_tdvp),
   1001        1.1       cgd 	VOPARG_OFFSETOF(struct vop_rename_args,a_tvp),
   1002        1.1       cgd 	VDESC_NO_OFFSET
   1003        1.1       cgd };
   1004       1.33  jdolecek const struct vnodeop_desc vop_rename_desc = {
   1005       1.67     pooka 	VOP_RENAME_DESCOFFSET,
   1006        1.1       cgd 	"vop_rename",
   1007       1.42  jdolecek 	0 | VDESC_VP0_WILLRELE | VDESC_VP1_WILLRELE | VDESC_VP2_WILLPUT | VDESC_VP3_WILLPUT,
   1008        1.1       cgd 	vop_rename_vp_offsets,
   1009        1.1       cgd 	VDESC_NO_OFFSET,
   1010        1.1       cgd 	VDESC_NO_OFFSET,
   1011        1.1       cgd 	VOPARG_OFFSETOF(struct vop_rename_args, a_fcnp),
   1012        1.1       cgd };
   1013       1.23   thorpej int
   1014       1.60   thorpej VOP_RENAME(struct vnode *fdvp,
   1015       1.60   thorpej     struct vnode *fvp,
   1016       1.60   thorpej     struct componentname *fcnp,
   1017       1.60   thorpej     struct vnode *tdvp,
   1018       1.60   thorpej     struct vnode *tvp,
   1019       1.60   thorpej     struct componentname *tcnp)
   1020       1.23   thorpej {
   1021       1.72        ad 	int error;
   1022       1.72        ad 	bool mpsafe;
   1023       1.23   thorpej 	struct vop_rename_args a;
   1024      1.105   hannken 	struct mount *mp;
   1025       1.23   thorpej 	a.a_desc = VDESC(vop_rename);
   1026       1.23   thorpej 	a.a_fdvp = fdvp;
   1027       1.23   thorpej 	a.a_fvp = fvp;
   1028       1.23   thorpej 	a.a_fcnp = fcnp;
   1029       1.23   thorpej 	a.a_tdvp = tdvp;
   1030       1.23   thorpej 	a.a_tvp = tvp;
   1031       1.23   thorpej 	a.a_tcnp = tcnp;
   1032      1.105   hannken 	error = vop_pre(fdvp, &mp, &mpsafe, FST_YES);
   1033      1.105   hannken 	if (error)
   1034      1.105   hannken 		return error;
   1035       1.72        ad 	error = (VCALL(fdvp, VOFFSET(vop_rename), &a));
   1036      1.105   hannken 	vop_post(fdvp, mp, mpsafe, FST_YES);
   1037       1.72        ad 	return error;
   1038       1.23   thorpej }
   1039        1.1       cgd 
   1040       1.31  jdolecek const int vop_mkdir_vp_offsets[] = {
   1041       1.91   hannken 	VOPARG_OFFSETOF(struct vop_mkdir_v3_args,a_dvp),
   1042        1.1       cgd 	VDESC_NO_OFFSET
   1043        1.1       cgd };
   1044       1.33  jdolecek const struct vnodeop_desc vop_mkdir_desc = {
   1045       1.67     pooka 	VOP_MKDIR_DESCOFFSET,
   1046        1.1       cgd 	"vop_mkdir",
   1047       1.90   hannken 	0,
   1048        1.1       cgd 	vop_mkdir_vp_offsets,
   1049       1.91   hannken 	VOPARG_OFFSETOF(struct vop_mkdir_v3_args, a_vpp),
   1050        1.1       cgd 	VDESC_NO_OFFSET,
   1051       1.91   hannken 	VOPARG_OFFSETOF(struct vop_mkdir_v3_args, a_cnp),
   1052        1.1       cgd };
   1053       1.23   thorpej int
   1054       1.60   thorpej VOP_MKDIR(struct vnode *dvp,
   1055       1.60   thorpej     struct vnode **vpp,
   1056       1.60   thorpej     struct componentname *cnp,
   1057       1.60   thorpej     struct vattr *vap)
   1058       1.23   thorpej {
   1059       1.72        ad 	int error;
   1060       1.72        ad 	bool mpsafe;
   1061       1.91   hannken 	struct vop_mkdir_v3_args a;
   1062      1.105   hannken 	struct mount *mp;
   1063       1.23   thorpej 	a.a_desc = VDESC(vop_mkdir);
   1064       1.23   thorpej 	a.a_dvp = dvp;
   1065       1.23   thorpej 	a.a_vpp = vpp;
   1066       1.23   thorpej 	a.a_cnp = cnp;
   1067       1.23   thorpej 	a.a_vap = vap;
   1068      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
   1069      1.105   hannken 	if (error)
   1070      1.105   hannken 		return error;
   1071       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_mkdir), &a));
   1072      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
   1073       1.69     pooka #ifdef DIAGNOSTIC
   1074       1.72        ad 	if (error == 0)
   1075       1.69     pooka 		KASSERT((*vpp)->v_size != VSIZENOTSET
   1076       1.69     pooka 		    && (*vpp)->v_writesize != VSIZENOTSET);
   1077       1.69     pooka #endif /* DIAGNOSTIC */
   1078       1.72        ad 	return error;
   1079       1.23   thorpej }
   1080        1.1       cgd 
   1081       1.31  jdolecek const int vop_rmdir_vp_offsets[] = {
   1082      1.103  riastrad 	VOPARG_OFFSETOF(struct vop_rmdir_v2_args,a_dvp),
   1083      1.103  riastrad 	VOPARG_OFFSETOF(struct vop_rmdir_v2_args,a_vp),
   1084        1.1       cgd 	VDESC_NO_OFFSET
   1085        1.1       cgd };
   1086       1.33  jdolecek const struct vnodeop_desc vop_rmdir_desc = {
   1087       1.67     pooka 	VOP_RMDIR_DESCOFFSET,
   1088        1.1       cgd 	"vop_rmdir",
   1089      1.103  riastrad 	0 | VDESC_VP1_WILLPUT,
   1090        1.1       cgd 	vop_rmdir_vp_offsets,
   1091        1.1       cgd 	VDESC_NO_OFFSET,
   1092        1.1       cgd 	VDESC_NO_OFFSET,
   1093      1.103  riastrad 	VOPARG_OFFSETOF(struct vop_rmdir_v2_args, a_cnp),
   1094        1.1       cgd };
   1095       1.23   thorpej int
   1096       1.60   thorpej VOP_RMDIR(struct vnode *dvp,
   1097       1.60   thorpej     struct vnode *vp,
   1098       1.60   thorpej     struct componentname *cnp)
   1099       1.23   thorpej {
   1100       1.72        ad 	int error;
   1101       1.72        ad 	bool mpsafe;
   1102      1.103  riastrad 	struct vop_rmdir_v2_args a;
   1103      1.105   hannken 	struct mount *mp;
   1104       1.23   thorpej 	a.a_desc = VDESC(vop_rmdir);
   1105       1.23   thorpej 	a.a_dvp = dvp;
   1106       1.81     pooka 	a.a_vp = vp;
   1107       1.23   thorpej 	a.a_cnp = cnp;
   1108      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
   1109      1.105   hannken 	if (error)
   1110      1.105   hannken 		return error;
   1111       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_rmdir), &a));
   1112      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
   1113       1.72        ad 	return error;
   1114       1.23   thorpej }
   1115        1.1       cgd 
   1116       1.31  jdolecek const int vop_symlink_vp_offsets[] = {
   1117       1.91   hannken 	VOPARG_OFFSETOF(struct vop_symlink_v3_args,a_dvp),
   1118        1.1       cgd 	VDESC_NO_OFFSET
   1119        1.1       cgd };
   1120       1.33  jdolecek const struct vnodeop_desc vop_symlink_desc = {
   1121       1.67     pooka 	VOP_SYMLINK_DESCOFFSET,
   1122        1.1       cgd 	"vop_symlink",
   1123       1.90   hannken 	0,
   1124        1.1       cgd 	vop_symlink_vp_offsets,
   1125       1.91   hannken 	VOPARG_OFFSETOF(struct vop_symlink_v3_args, a_vpp),
   1126        1.1       cgd 	VDESC_NO_OFFSET,
   1127       1.91   hannken 	VOPARG_OFFSETOF(struct vop_symlink_v3_args, a_cnp),
   1128        1.1       cgd };
   1129       1.23   thorpej int
   1130       1.60   thorpej VOP_SYMLINK(struct vnode *dvp,
   1131       1.60   thorpej     struct vnode **vpp,
   1132       1.60   thorpej     struct componentname *cnp,
   1133       1.60   thorpej     struct vattr *vap,
   1134       1.60   thorpej     char *target)
   1135       1.23   thorpej {
   1136       1.72        ad 	int error;
   1137       1.72        ad 	bool mpsafe;
   1138       1.91   hannken 	struct vop_symlink_v3_args a;
   1139      1.105   hannken 	struct mount *mp;
   1140       1.23   thorpej 	a.a_desc = VDESC(vop_symlink);
   1141       1.23   thorpej 	a.a_dvp = dvp;
   1142       1.23   thorpej 	a.a_vpp = vpp;
   1143       1.23   thorpej 	a.a_cnp = cnp;
   1144       1.23   thorpej 	a.a_vap = vap;
   1145       1.23   thorpej 	a.a_target = target;
   1146      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
   1147      1.105   hannken 	if (error)
   1148      1.105   hannken 		return error;
   1149       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_symlink), &a));
   1150      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
   1151       1.69     pooka #ifdef DIAGNOSTIC
   1152       1.72        ad 	if (error == 0)
   1153       1.69     pooka 		KASSERT((*vpp)->v_size != VSIZENOTSET
   1154       1.69     pooka 		    && (*vpp)->v_writesize != VSIZENOTSET);
   1155       1.69     pooka #endif /* DIAGNOSTIC */
   1156       1.72        ad 	return error;
   1157       1.23   thorpej }
   1158        1.1       cgd 
   1159       1.31  jdolecek const int vop_readdir_vp_offsets[] = {
   1160        1.1       cgd 	VOPARG_OFFSETOF(struct vop_readdir_args,a_vp),
   1161        1.1       cgd 	VDESC_NO_OFFSET
   1162        1.1       cgd };
   1163       1.33  jdolecek const struct vnodeop_desc vop_readdir_desc = {
   1164       1.67     pooka 	VOP_READDIR_DESCOFFSET,
   1165        1.1       cgd 	"vop_readdir",
   1166        1.1       cgd 	0,
   1167        1.1       cgd 	vop_readdir_vp_offsets,
   1168        1.1       cgd 	VDESC_NO_OFFSET,
   1169        1.1       cgd 	VOPARG_OFFSETOF(struct vop_readdir_args, a_cred),
   1170        1.1       cgd 	VDESC_NO_OFFSET,
   1171        1.1       cgd };
   1172       1.23   thorpej int
   1173       1.60   thorpej VOP_READDIR(struct vnode *vp,
   1174       1.60   thorpej     struct uio *uio,
   1175       1.65      elad     kauth_cred_t cred,
   1176       1.60   thorpej     int *eofflag,
   1177       1.60   thorpej     off_t **cookies,
   1178       1.60   thorpej     int *ncookies)
   1179       1.23   thorpej {
   1180       1.72        ad 	int error;
   1181       1.72        ad 	bool mpsafe;
   1182       1.23   thorpej 	struct vop_readdir_args a;
   1183      1.105   hannken 	struct mount *mp;
   1184       1.23   thorpej 	a.a_desc = VDESC(vop_readdir);
   1185       1.23   thorpej 	a.a_vp = vp;
   1186       1.23   thorpej 	a.a_uio = uio;
   1187       1.23   thorpej 	a.a_cred = cred;
   1188       1.23   thorpej 	a.a_eofflag = eofflag;
   1189       1.23   thorpej 	a.a_cookies = cookies;
   1190       1.23   thorpej 	a.a_ncookies = ncookies;
   1191      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1192      1.105   hannken 	if (error)
   1193      1.105   hannken 		return error;
   1194       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_readdir), &a));
   1195      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1196       1.72        ad 	return error;
   1197       1.23   thorpej }
   1198        1.1       cgd 
   1199       1.31  jdolecek const int vop_readlink_vp_offsets[] = {
   1200        1.1       cgd 	VOPARG_OFFSETOF(struct vop_readlink_args,a_vp),
   1201        1.1       cgd 	VDESC_NO_OFFSET
   1202        1.1       cgd };
   1203       1.33  jdolecek const struct vnodeop_desc vop_readlink_desc = {
   1204       1.67     pooka 	VOP_READLINK_DESCOFFSET,
   1205        1.1       cgd 	"vop_readlink",
   1206        1.1       cgd 	0,
   1207        1.1       cgd 	vop_readlink_vp_offsets,
   1208        1.1       cgd 	VDESC_NO_OFFSET,
   1209        1.1       cgd 	VOPARG_OFFSETOF(struct vop_readlink_args, a_cred),
   1210        1.1       cgd 	VDESC_NO_OFFSET,
   1211        1.1       cgd };
   1212       1.23   thorpej int
   1213       1.60   thorpej VOP_READLINK(struct vnode *vp,
   1214       1.60   thorpej     struct uio *uio,
   1215       1.65      elad     kauth_cred_t cred)
   1216       1.23   thorpej {
   1217       1.72        ad 	int error;
   1218       1.72        ad 	bool mpsafe;
   1219       1.23   thorpej 	struct vop_readlink_args a;
   1220      1.105   hannken 	struct mount *mp;
   1221       1.23   thorpej 	a.a_desc = VDESC(vop_readlink);
   1222       1.23   thorpej 	a.a_vp = vp;
   1223       1.23   thorpej 	a.a_uio = uio;
   1224       1.23   thorpej 	a.a_cred = cred;
   1225      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1226      1.105   hannken 	if (error)
   1227      1.105   hannken 		return error;
   1228       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_readlink), &a));
   1229      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1230       1.72        ad 	return error;
   1231       1.23   thorpej }
   1232        1.1       cgd 
   1233       1.31  jdolecek const int vop_abortop_vp_offsets[] = {
   1234        1.1       cgd 	VOPARG_OFFSETOF(struct vop_abortop_args,a_dvp),
   1235        1.1       cgd 	VDESC_NO_OFFSET
   1236        1.1       cgd };
   1237       1.33  jdolecek const struct vnodeop_desc vop_abortop_desc = {
   1238       1.67     pooka 	VOP_ABORTOP_DESCOFFSET,
   1239        1.1       cgd 	"vop_abortop",
   1240        1.1       cgd 	0,
   1241        1.1       cgd 	vop_abortop_vp_offsets,
   1242        1.1       cgd 	VDESC_NO_OFFSET,
   1243        1.1       cgd 	VDESC_NO_OFFSET,
   1244        1.1       cgd 	VOPARG_OFFSETOF(struct vop_abortop_args, a_cnp),
   1245        1.1       cgd };
   1246       1.23   thorpej int
   1247       1.60   thorpej VOP_ABORTOP(struct vnode *dvp,
   1248       1.60   thorpej     struct componentname *cnp)
   1249       1.23   thorpej {
   1250       1.72        ad 	int error;
   1251       1.72        ad 	bool mpsafe;
   1252       1.23   thorpej 	struct vop_abortop_args a;
   1253      1.105   hannken 	struct mount *mp;
   1254       1.23   thorpej 	a.a_desc = VDESC(vop_abortop);
   1255       1.23   thorpej 	a.a_dvp = dvp;
   1256       1.23   thorpej 	a.a_cnp = cnp;
   1257      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_YES);
   1258      1.105   hannken 	if (error)
   1259      1.105   hannken 		return error;
   1260       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_abortop), &a));
   1261      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_YES);
   1262       1.72        ad 	return error;
   1263       1.23   thorpej }
   1264        1.1       cgd 
   1265       1.31  jdolecek const int vop_inactive_vp_offsets[] = {
   1266       1.98  riastrad 	VOPARG_OFFSETOF(struct vop_inactive_v2_args,a_vp),
   1267        1.1       cgd 	VDESC_NO_OFFSET
   1268        1.1       cgd };
   1269       1.33  jdolecek const struct vnodeop_desc vop_inactive_desc = {
   1270       1.67     pooka 	VOP_INACTIVE_DESCOFFSET,
   1271        1.1       cgd 	"vop_inactive",
   1272       1.98  riastrad 	0,
   1273        1.1       cgd 	vop_inactive_vp_offsets,
   1274        1.1       cgd 	VDESC_NO_OFFSET,
   1275        1.1       cgd 	VDESC_NO_OFFSET,
   1276        1.1       cgd 	VDESC_NO_OFFSET,
   1277        1.1       cgd };
   1278       1.23   thorpej int
   1279       1.75        ad VOP_INACTIVE(struct vnode *vp,
   1280       1.75        ad     bool *recycle)
   1281       1.23   thorpej {
   1282       1.72        ad 	int error;
   1283       1.72        ad 	bool mpsafe;
   1284       1.98  riastrad 	struct vop_inactive_v2_args a;
   1285      1.105   hannken 	struct mount *mp;
   1286       1.23   thorpej 	a.a_desc = VDESC(vop_inactive);
   1287       1.23   thorpej 	a.a_vp = vp;
   1288       1.75        ad 	a.a_recycle = recycle;
   1289      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1290      1.105   hannken 	if (error)
   1291      1.105   hannken 		return error;
   1292       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_inactive), &a));
   1293      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1294       1.72        ad 	return error;
   1295       1.23   thorpej }
   1296        1.1       cgd 
   1297       1.31  jdolecek const int vop_reclaim_vp_offsets[] = {
   1298      1.104  riastrad 	VOPARG_OFFSETOF(struct vop_reclaim_v2_args,a_vp),
   1299        1.1       cgd 	VDESC_NO_OFFSET
   1300        1.1       cgd };
   1301       1.33  jdolecek const struct vnodeop_desc vop_reclaim_desc = {
   1302       1.67     pooka 	VOP_RECLAIM_DESCOFFSET,
   1303        1.1       cgd 	"vop_reclaim",
   1304        1.1       cgd 	0,
   1305        1.1       cgd 	vop_reclaim_vp_offsets,
   1306        1.1       cgd 	VDESC_NO_OFFSET,
   1307        1.1       cgd 	VDESC_NO_OFFSET,
   1308        1.1       cgd 	VDESC_NO_OFFSET,
   1309        1.1       cgd };
   1310       1.23   thorpej int
   1311       1.73     pooka VOP_RECLAIM(struct vnode *vp)
   1312       1.23   thorpej {
   1313       1.72        ad 	int error;
   1314       1.72        ad 	bool mpsafe;
   1315      1.104  riastrad 	struct vop_reclaim_v2_args a;
   1316      1.105   hannken 	struct mount *mp;
   1317       1.23   thorpej 	a.a_desc = VDESC(vop_reclaim);
   1318       1.23   thorpej 	a.a_vp = vp;
   1319      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1320      1.105   hannken 	if (error)
   1321      1.105   hannken 		return error;
   1322       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_reclaim), &a));
   1323      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1324       1.72        ad 	return error;
   1325       1.23   thorpej }
   1326        1.1       cgd 
   1327       1.31  jdolecek const int vop_lock_vp_offsets[] = {
   1328        1.1       cgd 	VOPARG_OFFSETOF(struct vop_lock_args,a_vp),
   1329        1.1       cgd 	VDESC_NO_OFFSET
   1330        1.1       cgd };
   1331       1.33  jdolecek const struct vnodeop_desc vop_lock_desc = {
   1332       1.67     pooka 	VOP_LOCK_DESCOFFSET,
   1333        1.1       cgd 	"vop_lock",
   1334        1.1       cgd 	0,
   1335        1.1       cgd 	vop_lock_vp_offsets,
   1336        1.1       cgd 	VDESC_NO_OFFSET,
   1337        1.1       cgd 	VDESC_NO_OFFSET,
   1338        1.1       cgd 	VDESC_NO_OFFSET,
   1339        1.1       cgd };
   1340       1.23   thorpej int
   1341       1.60   thorpej VOP_LOCK(struct vnode *vp,
   1342       1.60   thorpej     int flags)
   1343       1.23   thorpej {
   1344       1.72        ad 	int error;
   1345       1.72        ad 	bool mpsafe;
   1346       1.23   thorpej 	struct vop_lock_args a;
   1347      1.105   hannken 	struct mount *mp;
   1348       1.23   thorpej 	a.a_desc = VDESC(vop_lock);
   1349       1.23   thorpej 	a.a_vp = vp;
   1350       1.23   thorpej 	a.a_flags = flags;
   1351      1.110        ad 	error = vop_pre(vp, &mp, &mpsafe, (!(flags & (LK_SHARED|LK_EXCLUSIVE)) ? FST_NO : (flags & LK_NOWAIT ? FST_TRY : FST_YES)));
   1352      1.105   hannken 	if (error)
   1353      1.105   hannken 		return error;
   1354       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_lock), &a));
   1355      1.109        ad 	vop_post(vp, mp, mpsafe, (flags & (LK_UPGRADE|LK_DOWNGRADE) ? FST_NO : (error ? FST_YES : FST_NO)));
   1356       1.72        ad 	return error;
   1357       1.23   thorpej }
   1358        1.1       cgd 
   1359       1.31  jdolecek const int vop_unlock_vp_offsets[] = {
   1360        1.1       cgd 	VOPARG_OFFSETOF(struct vop_unlock_args,a_vp),
   1361        1.1       cgd 	VDESC_NO_OFFSET
   1362        1.1       cgd };
   1363       1.33  jdolecek const struct vnodeop_desc vop_unlock_desc = {
   1364       1.67     pooka 	VOP_UNLOCK_DESCOFFSET,
   1365        1.1       cgd 	"vop_unlock",
   1366        1.1       cgd 	0,
   1367        1.1       cgd 	vop_unlock_vp_offsets,
   1368        1.1       cgd 	VDESC_NO_OFFSET,
   1369        1.1       cgd 	VDESC_NO_OFFSET,
   1370        1.1       cgd 	VDESC_NO_OFFSET,
   1371        1.1       cgd };
   1372       1.23   thorpej int
   1373       1.85   hannken VOP_UNLOCK(struct vnode *vp)
   1374       1.23   thorpej {
   1375       1.72        ad 	int error;
   1376       1.72        ad 	bool mpsafe;
   1377       1.23   thorpej 	struct vop_unlock_args a;
   1378      1.105   hannken 	struct mount *mp;
   1379       1.23   thorpej 	a.a_desc = VDESC(vop_unlock);
   1380       1.23   thorpej 	a.a_vp = vp;
   1381      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1382      1.105   hannken 	if (error)
   1383      1.105   hannken 		return error;
   1384       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_unlock), &a));
   1385      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
   1386       1.72        ad 	return error;
   1387       1.23   thorpej }
   1388        1.1       cgd 
   1389       1.31  jdolecek const int vop_bmap_vp_offsets[] = {
   1390        1.1       cgd 	VOPARG_OFFSETOF(struct vop_bmap_args,a_vp),
   1391        1.1       cgd 	VDESC_NO_OFFSET
   1392        1.1       cgd };
   1393       1.33  jdolecek const struct vnodeop_desc vop_bmap_desc = {
   1394       1.67     pooka 	VOP_BMAP_DESCOFFSET,
   1395        1.1       cgd 	"vop_bmap",
   1396        1.1       cgd 	0,
   1397        1.1       cgd 	vop_bmap_vp_offsets,
   1398        1.1       cgd 	VOPARG_OFFSETOF(struct vop_bmap_args, a_vpp),
   1399        1.1       cgd 	VDESC_NO_OFFSET,
   1400        1.1       cgd 	VDESC_NO_OFFSET,
   1401        1.1       cgd };
   1402       1.23   thorpej int
   1403       1.60   thorpej VOP_BMAP(struct vnode *vp,
   1404       1.60   thorpej     daddr_t bn,
   1405       1.60   thorpej     struct vnode **vpp,
   1406       1.60   thorpej     daddr_t *bnp,
   1407       1.60   thorpej     int *runp)
   1408       1.23   thorpej {
   1409       1.72        ad 	int error;
   1410       1.72        ad 	bool mpsafe;
   1411       1.23   thorpej 	struct vop_bmap_args a;
   1412      1.105   hannken 	struct mount *mp;
   1413       1.23   thorpej 	a.a_desc = VDESC(vop_bmap);
   1414       1.23   thorpej 	a.a_vp = vp;
   1415       1.23   thorpej 	a.a_bn = bn;
   1416       1.23   thorpej 	a.a_vpp = vpp;
   1417       1.23   thorpej 	a.a_bnp = bnp;
   1418       1.23   thorpej 	a.a_runp = runp;
   1419      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
   1420      1.105   hannken 	if (error)
   1421      1.105   hannken 		return error;
   1422       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_bmap), &a));
   1423      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
   1424       1.72        ad 	return error;
   1425       1.23   thorpej }
   1426        1.1       cgd 
   1427       1.46   hannken const int vop_strategy_vp_offsets[] = {
   1428       1.46   hannken 	VOPARG_OFFSETOF(struct vop_strategy_args,a_vp),
   1429       1.46   hannken 	VDESC_NO_OFFSET
   1430       1.46   hannken };
   1431       1.46   hannken const struct vnodeop_desc vop_strategy_desc = {
   1432       1.67     pooka 	VOP_STRATEGY_DESCOFFSET,
   1433       1.46   hannken 	"vop_strategy",
   1434       1.46   hannken 	0,
   1435       1.46   hannken 	vop_strategy_vp_offsets,
   1436       1.46   hannken 	VDESC_NO_OFFSET,
   1437       1.46   hannken 	VDESC_NO_OFFSET,
   1438       1.46   hannken 	VDESC_NO_OFFSET,
   1439       1.46   hannken };
   1440       1.46   hannken int
   1441       1.60   thorpej VOP_STRATEGY(struct vnode *vp,
   1442       1.60   thorpej     struct buf *bp)
   1443       1.46   hannken {
   1444       1.72        ad 	int error;
   1445       1.72        ad 	bool mpsafe;
   1446       1.46   hannken 	struct vop_strategy_args a;
   1447      1.105   hannken 	struct mount *mp;
   1448       1.46   hannken 	a.a_desc = VDESC(vop_strategy);
   1449       1.46   hannken 	a.a_vp = vp;
   1450       1.46   hannken 	a.a_bp = bp;
   1451      1.112   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1452      1.105   hannken 	if (error)
   1453      1.105   hannken 		return error;
   1454       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_strategy), &a));
   1455      1.112   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1456       1.72        ad 	return error;
   1457       1.46   hannken }
   1458       1.46   hannken 
   1459       1.31  jdolecek const int vop_print_vp_offsets[] = {
   1460        1.1       cgd 	VOPARG_OFFSETOF(struct vop_print_args,a_vp),
   1461        1.1       cgd 	VDESC_NO_OFFSET
   1462        1.1       cgd };
   1463       1.33  jdolecek const struct vnodeop_desc vop_print_desc = {
   1464       1.67     pooka 	VOP_PRINT_DESCOFFSET,
   1465        1.1       cgd 	"vop_print",
   1466        1.1       cgd 	0,
   1467        1.1       cgd 	vop_print_vp_offsets,
   1468        1.1       cgd 	VDESC_NO_OFFSET,
   1469        1.1       cgd 	VDESC_NO_OFFSET,
   1470        1.1       cgd 	VDESC_NO_OFFSET,
   1471        1.1       cgd };
   1472       1.23   thorpej int
   1473       1.60   thorpej VOP_PRINT(struct vnode *vp)
   1474       1.23   thorpej {
   1475       1.72        ad 	int error;
   1476       1.72        ad 	bool mpsafe;
   1477       1.23   thorpej 	struct vop_print_args a;
   1478      1.105   hannken 	struct mount *mp;
   1479       1.23   thorpej 	a.a_desc = VDESC(vop_print);
   1480       1.23   thorpej 	a.a_vp = vp;
   1481      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
   1482      1.105   hannken 	if (error)
   1483      1.105   hannken 		return error;
   1484       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_print), &a));
   1485      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_YES);
   1486       1.72        ad 	return error;
   1487       1.23   thorpej }
   1488        1.1       cgd 
   1489       1.31  jdolecek const int vop_islocked_vp_offsets[] = {
   1490        1.1       cgd 	VOPARG_OFFSETOF(struct vop_islocked_args,a_vp),
   1491        1.1       cgd 	VDESC_NO_OFFSET
   1492        1.1       cgd };
   1493       1.33  jdolecek const struct vnodeop_desc vop_islocked_desc = {
   1494       1.67     pooka 	VOP_ISLOCKED_DESCOFFSET,
   1495        1.1       cgd 	"vop_islocked",
   1496        1.1       cgd 	0,
   1497        1.1       cgd 	vop_islocked_vp_offsets,
   1498        1.1       cgd 	VDESC_NO_OFFSET,
   1499        1.1       cgd 	VDESC_NO_OFFSET,
   1500        1.1       cgd 	VDESC_NO_OFFSET,
   1501        1.1       cgd };
   1502       1.23   thorpej int
   1503       1.60   thorpej VOP_ISLOCKED(struct vnode *vp)
   1504       1.23   thorpej {
   1505       1.72        ad 	int error;
   1506       1.72        ad 	bool mpsafe;
   1507       1.23   thorpej 	struct vop_islocked_args a;
   1508      1.105   hannken 	struct mount *mp;
   1509       1.23   thorpej 	a.a_desc = VDESC(vop_islocked);
   1510       1.23   thorpej 	a.a_vp = vp;
   1511      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1512      1.105   hannken 	if (error)
   1513      1.105   hannken 		return error;
   1514       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_islocked), &a));
   1515      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1516       1.72        ad 	return error;
   1517       1.23   thorpej }
   1518        1.1       cgd 
   1519       1.31  jdolecek const int vop_pathconf_vp_offsets[] = {
   1520        1.1       cgd 	VOPARG_OFFSETOF(struct vop_pathconf_args,a_vp),
   1521        1.1       cgd 	VDESC_NO_OFFSET
   1522        1.1       cgd };
   1523       1.33  jdolecek const struct vnodeop_desc vop_pathconf_desc = {
   1524       1.67     pooka 	VOP_PATHCONF_DESCOFFSET,
   1525        1.1       cgd 	"vop_pathconf",
   1526        1.1       cgd 	0,
   1527        1.1       cgd 	vop_pathconf_vp_offsets,
   1528        1.1       cgd 	VDESC_NO_OFFSET,
   1529        1.1       cgd 	VDESC_NO_OFFSET,
   1530        1.1       cgd 	VDESC_NO_OFFSET,
   1531        1.1       cgd };
   1532       1.23   thorpej int
   1533       1.60   thorpej VOP_PATHCONF(struct vnode *vp,
   1534       1.60   thorpej     int name,
   1535       1.60   thorpej     register_t *retval)
   1536       1.23   thorpej {
   1537       1.72        ad 	int error;
   1538       1.72        ad 	bool mpsafe;
   1539       1.23   thorpej 	struct vop_pathconf_args a;
   1540      1.105   hannken 	struct mount *mp;
   1541       1.23   thorpej 	a.a_desc = VDESC(vop_pathconf);
   1542       1.23   thorpej 	a.a_vp = vp;
   1543       1.23   thorpej 	a.a_name = name;
   1544       1.23   thorpej 	a.a_retval = retval;
   1545      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1546      1.105   hannken 	if (error)
   1547      1.105   hannken 		return error;
   1548       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_pathconf), &a));
   1549      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1550       1.72        ad 	return error;
   1551       1.23   thorpej }
   1552        1.1       cgd 
   1553       1.31  jdolecek const int vop_advlock_vp_offsets[] = {
   1554        1.1       cgd 	VOPARG_OFFSETOF(struct vop_advlock_args,a_vp),
   1555        1.1       cgd 	VDESC_NO_OFFSET
   1556        1.1       cgd };
   1557       1.33  jdolecek const struct vnodeop_desc vop_advlock_desc = {
   1558       1.67     pooka 	VOP_ADVLOCK_DESCOFFSET,
   1559        1.1       cgd 	"vop_advlock",
   1560        1.1       cgd 	0,
   1561        1.1       cgd 	vop_advlock_vp_offsets,
   1562        1.1       cgd 	VDESC_NO_OFFSET,
   1563        1.1       cgd 	VDESC_NO_OFFSET,
   1564        1.1       cgd 	VDESC_NO_OFFSET,
   1565        1.1       cgd };
   1566       1.23   thorpej int
   1567       1.60   thorpej VOP_ADVLOCK(struct vnode *vp,
   1568       1.60   thorpej     void *id,
   1569       1.60   thorpej     int op,
   1570       1.60   thorpej     struct flock *fl,
   1571       1.60   thorpej     int flags)
   1572       1.23   thorpej {
   1573       1.72        ad 	int error;
   1574       1.72        ad 	bool mpsafe;
   1575       1.23   thorpej 	struct vop_advlock_args a;
   1576      1.105   hannken 	struct mount *mp;
   1577       1.23   thorpej 	a.a_desc = VDESC(vop_advlock);
   1578       1.23   thorpej 	a.a_vp = vp;
   1579       1.23   thorpej 	a.a_id = id;
   1580       1.23   thorpej 	a.a_op = op;
   1581       1.23   thorpej 	a.a_fl = fl;
   1582       1.23   thorpej 	a.a_flags = flags;
   1583      1.107   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1584      1.105   hannken 	if (error)
   1585      1.105   hannken 		return error;
   1586       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_advlock), &a));
   1587      1.107   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1588       1.72        ad 	return error;
   1589       1.23   thorpej }
   1590        1.1       cgd 
   1591       1.31  jdolecek const int vop_whiteout_vp_offsets[] = {
   1592        1.1       cgd 	VOPARG_OFFSETOF(struct vop_whiteout_args,a_dvp),
   1593        1.1       cgd 	VDESC_NO_OFFSET
   1594        1.1       cgd };
   1595       1.33  jdolecek const struct vnodeop_desc vop_whiteout_desc = {
   1596       1.67     pooka 	VOP_WHITEOUT_DESCOFFSET,
   1597        1.1       cgd 	"vop_whiteout",
   1598        1.1       cgd 	0,
   1599        1.1       cgd 	vop_whiteout_vp_offsets,
   1600        1.1       cgd 	VDESC_NO_OFFSET,
   1601        1.1       cgd 	VDESC_NO_OFFSET,
   1602        1.1       cgd 	VOPARG_OFFSETOF(struct vop_whiteout_args, a_cnp),
   1603        1.1       cgd };
   1604       1.23   thorpej int
   1605       1.60   thorpej VOP_WHITEOUT(struct vnode *dvp,
   1606       1.60   thorpej     struct componentname *cnp,
   1607       1.60   thorpej     int flags)
   1608       1.23   thorpej {
   1609       1.72        ad 	int error;
   1610       1.72        ad 	bool mpsafe;
   1611       1.23   thorpej 	struct vop_whiteout_args a;
   1612      1.105   hannken 	struct mount *mp;
   1613       1.23   thorpej 	a.a_desc = VDESC(vop_whiteout);
   1614       1.23   thorpej 	a.a_dvp = dvp;
   1615       1.23   thorpej 	a.a_cnp = cnp;
   1616       1.23   thorpej 	a.a_flags = flags;
   1617      1.105   hannken 	error = vop_pre(dvp, &mp, &mpsafe, FST_NO);
   1618      1.105   hannken 	if (error)
   1619      1.105   hannken 		return error;
   1620       1.72        ad 	error = (VCALL(dvp, VOFFSET(vop_whiteout), &a));
   1621      1.105   hannken 	vop_post(dvp, mp, mpsafe, FST_NO);
   1622       1.72        ad 	return error;
   1623       1.23   thorpej }
   1624        1.1       cgd 
   1625       1.31  jdolecek const int vop_getpages_vp_offsets[] = {
   1626       1.26       chs 	VOPARG_OFFSETOF(struct vop_getpages_args,a_vp),
   1627       1.26       chs 	VDESC_NO_OFFSET
   1628       1.26       chs };
   1629       1.33  jdolecek const struct vnodeop_desc vop_getpages_desc = {
   1630       1.67     pooka 	VOP_GETPAGES_DESCOFFSET,
   1631       1.26       chs 	"vop_getpages",
   1632       1.26       chs 	0,
   1633       1.26       chs 	vop_getpages_vp_offsets,
   1634       1.26       chs 	VDESC_NO_OFFSET,
   1635       1.26       chs 	VDESC_NO_OFFSET,
   1636       1.26       chs 	VDESC_NO_OFFSET,
   1637       1.26       chs };
   1638       1.26       chs int
   1639       1.60   thorpej VOP_GETPAGES(struct vnode *vp,
   1640       1.60   thorpej     voff_t offset,
   1641       1.60   thorpej     struct vm_page **m,
   1642       1.60   thorpej     int *count,
   1643       1.60   thorpej     int centeridx,
   1644       1.60   thorpej     vm_prot_t access_type,
   1645       1.60   thorpej     int advice,
   1646       1.60   thorpej     int flags)
   1647       1.26       chs {
   1648       1.72        ad 	int error;
   1649       1.72        ad 	bool mpsafe;
   1650       1.26       chs 	struct vop_getpages_args a;
   1651      1.105   hannken 	struct mount *mp;
   1652       1.26       chs 	a.a_desc = VDESC(vop_getpages);
   1653       1.26       chs 	a.a_vp = vp;
   1654       1.26       chs 	a.a_offset = offset;
   1655       1.26       chs 	a.a_m = m;
   1656       1.26       chs 	a.a_count = count;
   1657       1.26       chs 	a.a_centeridx = centeridx;
   1658       1.26       chs 	a.a_access_type = access_type;
   1659       1.26       chs 	a.a_advice = advice;
   1660       1.26       chs 	a.a_flags = flags;
   1661      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1662      1.105   hannken 	if (error)
   1663      1.105   hannken 		return error;
   1664       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_getpages), &a));
   1665      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1666       1.72        ad 	return error;
   1667       1.26       chs }
   1668       1.26       chs 
   1669       1.31  jdolecek const int vop_putpages_vp_offsets[] = {
   1670       1.26       chs 	VOPARG_OFFSETOF(struct vop_putpages_args,a_vp),
   1671       1.26       chs 	VDESC_NO_OFFSET
   1672       1.26       chs };
   1673       1.33  jdolecek const struct vnodeop_desc vop_putpages_desc = {
   1674       1.67     pooka 	VOP_PUTPAGES_DESCOFFSET,
   1675       1.26       chs 	"vop_putpages",
   1676       1.26       chs 	0,
   1677       1.26       chs 	vop_putpages_vp_offsets,
   1678       1.26       chs 	VDESC_NO_OFFSET,
   1679       1.26       chs 	VDESC_NO_OFFSET,
   1680       1.26       chs 	VDESC_NO_OFFSET,
   1681       1.26       chs };
   1682       1.26       chs int
   1683       1.60   thorpej VOP_PUTPAGES(struct vnode *vp,
   1684       1.60   thorpej     voff_t offlo,
   1685       1.60   thorpej     voff_t offhi,
   1686       1.60   thorpej     int flags)
   1687       1.26       chs {
   1688       1.72        ad 	int error;
   1689       1.72        ad 	bool mpsafe;
   1690       1.26       chs 	struct vop_putpages_args a;
   1691      1.105   hannken 	struct mount *mp;
   1692       1.26       chs 	a.a_desc = VDESC(vop_putpages);
   1693       1.26       chs 	a.a_vp = vp;
   1694       1.38       chs 	a.a_offlo = offlo;
   1695       1.38       chs 	a.a_offhi = offhi;
   1696       1.26       chs 	a.a_flags = flags;
   1697      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1698      1.105   hannken 	if (error)
   1699      1.105   hannken 		return error;
   1700       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_putpages), &a));
   1701      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1702       1.72        ad 	return error;
   1703       1.26       chs }
   1704       1.26       chs 
   1705      1.111  christos const int vop_getacl_vp_offsets[] = {
   1706      1.111  christos 	VOPARG_OFFSETOF(struct vop_getacl_args,a_vp),
   1707      1.111  christos 	VDESC_NO_OFFSET
   1708      1.111  christos };
   1709      1.111  christos const struct vnodeop_desc vop_getacl_desc = {
   1710      1.111  christos 	VOP_GETACL_DESCOFFSET,
   1711      1.111  christos 	"vop_getacl",
   1712      1.111  christos 	0,
   1713      1.111  christos 	vop_getacl_vp_offsets,
   1714      1.111  christos 	VDESC_NO_OFFSET,
   1715      1.111  christos 	VOPARG_OFFSETOF(struct vop_getacl_args, a_cred),
   1716      1.111  christos 	VDESC_NO_OFFSET,
   1717      1.111  christos };
   1718      1.111  christos int
   1719      1.111  christos VOP_GETACL(struct vnode *vp,
   1720      1.111  christos     acl_type_t type,
   1721      1.111  christos     struct acl *aclp,
   1722      1.111  christos     kauth_cred_t cred)
   1723      1.111  christos {
   1724      1.111  christos 	int error;
   1725      1.111  christos 	bool mpsafe;
   1726      1.111  christos 	struct vop_getacl_args a;
   1727      1.111  christos 	struct mount *mp;
   1728      1.111  christos 	a.a_desc = VDESC(vop_getacl);
   1729      1.111  christos 	a.a_vp = vp;
   1730      1.111  christos 	a.a_type = type;
   1731      1.111  christos 	a.a_aclp = aclp;
   1732      1.111  christos 	a.a_cred = cred;
   1733      1.111  christos 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
   1734      1.111  christos 	if (error)
   1735      1.111  christos 		return error;
   1736      1.111  christos 	error = (VCALL(vp, VOFFSET(vop_getacl), &a));
   1737      1.111  christos 	vop_post(vp, mp, mpsafe, FST_YES);
   1738      1.111  christos 	return error;
   1739      1.111  christos }
   1740      1.111  christos 
   1741      1.111  christos const int vop_setacl_vp_offsets[] = {
   1742      1.111  christos 	VOPARG_OFFSETOF(struct vop_setacl_args,a_vp),
   1743      1.111  christos 	VDESC_NO_OFFSET
   1744      1.111  christos };
   1745      1.111  christos const struct vnodeop_desc vop_setacl_desc = {
   1746      1.111  christos 	VOP_SETACL_DESCOFFSET,
   1747      1.111  christos 	"vop_setacl",
   1748      1.111  christos 	0,
   1749      1.111  christos 	vop_setacl_vp_offsets,
   1750      1.111  christos 	VDESC_NO_OFFSET,
   1751      1.111  christos 	VOPARG_OFFSETOF(struct vop_setacl_args, a_cred),
   1752      1.111  christos 	VDESC_NO_OFFSET,
   1753      1.111  christos };
   1754      1.111  christos int
   1755      1.111  christos VOP_SETACL(struct vnode *vp,
   1756      1.111  christos     acl_type_t type,
   1757      1.111  christos     struct acl *aclp,
   1758      1.111  christos     kauth_cred_t cred)
   1759      1.111  christos {
   1760      1.111  christos 	int error;
   1761      1.111  christos 	bool mpsafe;
   1762      1.111  christos 	struct vop_setacl_args a;
   1763      1.111  christos 	struct mount *mp;
   1764      1.111  christos 	a.a_desc = VDESC(vop_setacl);
   1765      1.111  christos 	a.a_vp = vp;
   1766      1.111  christos 	a.a_type = type;
   1767      1.111  christos 	a.a_aclp = aclp;
   1768      1.111  christos 	a.a_cred = cred;
   1769      1.111  christos 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
   1770      1.111  christos 	if (error)
   1771      1.111  christos 		return error;
   1772      1.111  christos 	error = (VCALL(vp, VOFFSET(vop_setacl), &a));
   1773      1.111  christos 	vop_post(vp, mp, mpsafe, FST_YES);
   1774      1.111  christos 	return error;
   1775      1.111  christos }
   1776      1.111  christos 
   1777      1.111  christos const int vop_aclcheck_vp_offsets[] = {
   1778      1.111  christos 	VOPARG_OFFSETOF(struct vop_aclcheck_args,a_vp),
   1779      1.111  christos 	VDESC_NO_OFFSET
   1780      1.111  christos };
   1781      1.111  christos const struct vnodeop_desc vop_aclcheck_desc = {
   1782      1.111  christos 	VOP_ACLCHECK_DESCOFFSET,
   1783      1.111  christos 	"vop_aclcheck",
   1784      1.111  christos 	0,
   1785      1.111  christos 	vop_aclcheck_vp_offsets,
   1786      1.111  christos 	VDESC_NO_OFFSET,
   1787      1.111  christos 	VOPARG_OFFSETOF(struct vop_aclcheck_args, a_cred),
   1788      1.111  christos 	VDESC_NO_OFFSET,
   1789      1.111  christos };
   1790      1.111  christos int
   1791      1.111  christos VOP_ACLCHECK(struct vnode *vp,
   1792      1.111  christos     acl_type_t type,
   1793      1.111  christos     struct acl *aclp,
   1794      1.111  christos     kauth_cred_t cred)
   1795      1.111  christos {
   1796      1.111  christos 	int error;
   1797      1.111  christos 	bool mpsafe;
   1798      1.111  christos 	struct vop_aclcheck_args a;
   1799      1.111  christos 	struct mount *mp;
   1800      1.111  christos 	a.a_desc = VDESC(vop_aclcheck);
   1801      1.111  christos 	a.a_vp = vp;
   1802      1.111  christos 	a.a_type = type;
   1803      1.111  christos 	a.a_aclp = aclp;
   1804      1.111  christos 	a.a_cred = cred;
   1805      1.111  christos 	error = vop_pre(vp, &mp, &mpsafe, FST_YES);
   1806      1.111  christos 	if (error)
   1807      1.111  christos 		return error;
   1808      1.111  christos 	error = (VCALL(vp, VOFFSET(vop_aclcheck), &a));
   1809      1.111  christos 	vop_post(vp, mp, mpsafe, FST_YES);
   1810      1.111  christos 	return error;
   1811      1.111  christos }
   1812      1.111  christos 
   1813       1.51   thorpej const int vop_closeextattr_vp_offsets[] = {
   1814       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_closeextattr_args,a_vp),
   1815       1.51   thorpej 	VDESC_NO_OFFSET
   1816       1.51   thorpej };
   1817       1.51   thorpej const struct vnodeop_desc vop_closeextattr_desc = {
   1818       1.67     pooka 	VOP_CLOSEEXTATTR_DESCOFFSET,
   1819       1.51   thorpej 	"vop_closeextattr",
   1820       1.51   thorpej 	0,
   1821       1.51   thorpej 	vop_closeextattr_vp_offsets,
   1822       1.51   thorpej 	VDESC_NO_OFFSET,
   1823       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_closeextattr_args, a_cred),
   1824       1.51   thorpej 	VDESC_NO_OFFSET,
   1825       1.51   thorpej };
   1826       1.51   thorpej int
   1827       1.60   thorpej VOP_CLOSEEXTATTR(struct vnode *vp,
   1828       1.60   thorpej     int commit,
   1829       1.73     pooka     kauth_cred_t cred)
   1830       1.51   thorpej {
   1831       1.72        ad 	int error;
   1832       1.72        ad 	bool mpsafe;
   1833       1.51   thorpej 	struct vop_closeextattr_args a;
   1834      1.105   hannken 	struct mount *mp;
   1835       1.51   thorpej 	a.a_desc = VDESC(vop_closeextattr);
   1836       1.51   thorpej 	a.a_vp = vp;
   1837       1.51   thorpej 	a.a_commit = commit;
   1838       1.51   thorpej 	a.a_cred = cred;
   1839      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1840      1.105   hannken 	if (error)
   1841      1.105   hannken 		return error;
   1842       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_closeextattr), &a));
   1843      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1844       1.72        ad 	return error;
   1845       1.51   thorpej }
   1846       1.51   thorpej 
   1847       1.51   thorpej const int vop_getextattr_vp_offsets[] = {
   1848       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_getextattr_args,a_vp),
   1849       1.51   thorpej 	VDESC_NO_OFFSET
   1850       1.51   thorpej };
   1851       1.51   thorpej const struct vnodeop_desc vop_getextattr_desc = {
   1852       1.67     pooka 	VOP_GETEXTATTR_DESCOFFSET,
   1853       1.51   thorpej 	"vop_getextattr",
   1854       1.51   thorpej 	0,
   1855       1.51   thorpej 	vop_getextattr_vp_offsets,
   1856       1.51   thorpej 	VDESC_NO_OFFSET,
   1857       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_getextattr_args, a_cred),
   1858       1.51   thorpej 	VDESC_NO_OFFSET,
   1859       1.51   thorpej };
   1860       1.51   thorpej int
   1861       1.60   thorpej VOP_GETEXTATTR(struct vnode *vp,
   1862       1.60   thorpej     int attrnamespace,
   1863       1.60   thorpej     const char *name,
   1864       1.60   thorpej     struct uio *uio,
   1865       1.60   thorpej     size_t *size,
   1866       1.73     pooka     kauth_cred_t cred)
   1867       1.51   thorpej {
   1868       1.72        ad 	int error;
   1869       1.72        ad 	bool mpsafe;
   1870       1.51   thorpej 	struct vop_getextattr_args a;
   1871      1.105   hannken 	struct mount *mp;
   1872       1.51   thorpej 	a.a_desc = VDESC(vop_getextattr);
   1873       1.51   thorpej 	a.a_vp = vp;
   1874       1.51   thorpej 	a.a_attrnamespace = attrnamespace;
   1875       1.51   thorpej 	a.a_name = name;
   1876       1.51   thorpej 	a.a_uio = uio;
   1877       1.51   thorpej 	a.a_size = size;
   1878       1.51   thorpej 	a.a_cred = cred;
   1879      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1880      1.105   hannken 	if (error)
   1881      1.105   hannken 		return error;
   1882       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_getextattr), &a));
   1883      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1884       1.72        ad 	return error;
   1885       1.51   thorpej }
   1886       1.51   thorpej 
   1887       1.51   thorpej const int vop_listextattr_vp_offsets[] = {
   1888       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_listextattr_args,a_vp),
   1889       1.51   thorpej 	VDESC_NO_OFFSET
   1890       1.51   thorpej };
   1891       1.51   thorpej const struct vnodeop_desc vop_listextattr_desc = {
   1892       1.67     pooka 	VOP_LISTEXTATTR_DESCOFFSET,
   1893       1.51   thorpej 	"vop_listextattr",
   1894       1.51   thorpej 	0,
   1895       1.51   thorpej 	vop_listextattr_vp_offsets,
   1896       1.51   thorpej 	VDESC_NO_OFFSET,
   1897       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_listextattr_args, a_cred),
   1898       1.51   thorpej 	VDESC_NO_OFFSET,
   1899       1.51   thorpej };
   1900       1.51   thorpej int
   1901       1.60   thorpej VOP_LISTEXTATTR(struct vnode *vp,
   1902       1.60   thorpej     int attrnamespace,
   1903       1.60   thorpej     struct uio *uio,
   1904       1.60   thorpej     size_t *size,
   1905       1.87      manu     int flag,
   1906       1.73     pooka     kauth_cred_t cred)
   1907       1.51   thorpej {
   1908       1.72        ad 	int error;
   1909       1.72        ad 	bool mpsafe;
   1910       1.51   thorpej 	struct vop_listextattr_args a;
   1911      1.105   hannken 	struct mount *mp;
   1912       1.51   thorpej 	a.a_desc = VDESC(vop_listextattr);
   1913       1.51   thorpej 	a.a_vp = vp;
   1914       1.51   thorpej 	a.a_attrnamespace = attrnamespace;
   1915       1.51   thorpej 	a.a_uio = uio;
   1916       1.51   thorpej 	a.a_size = size;
   1917       1.87      manu 	a.a_flag = flag;
   1918       1.51   thorpej 	a.a_cred = cred;
   1919      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1920      1.105   hannken 	if (error)
   1921      1.105   hannken 		return error;
   1922       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_listextattr), &a));
   1923      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1924       1.72        ad 	return error;
   1925       1.51   thorpej }
   1926       1.51   thorpej 
   1927       1.51   thorpej const int vop_openextattr_vp_offsets[] = {
   1928       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_openextattr_args,a_vp),
   1929       1.51   thorpej 	VDESC_NO_OFFSET
   1930       1.51   thorpej };
   1931       1.51   thorpej const struct vnodeop_desc vop_openextattr_desc = {
   1932       1.67     pooka 	VOP_OPENEXTATTR_DESCOFFSET,
   1933       1.51   thorpej 	"vop_openextattr",
   1934       1.51   thorpej 	0,
   1935       1.51   thorpej 	vop_openextattr_vp_offsets,
   1936       1.51   thorpej 	VDESC_NO_OFFSET,
   1937       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_openextattr_args, a_cred),
   1938       1.51   thorpej 	VDESC_NO_OFFSET,
   1939       1.51   thorpej };
   1940       1.51   thorpej int
   1941       1.60   thorpej VOP_OPENEXTATTR(struct vnode *vp,
   1942       1.73     pooka     kauth_cred_t cred)
   1943       1.51   thorpej {
   1944       1.72        ad 	int error;
   1945       1.72        ad 	bool mpsafe;
   1946       1.51   thorpej 	struct vop_openextattr_args a;
   1947      1.105   hannken 	struct mount *mp;
   1948       1.51   thorpej 	a.a_desc = VDESC(vop_openextattr);
   1949       1.51   thorpej 	a.a_vp = vp;
   1950       1.51   thorpej 	a.a_cred = cred;
   1951      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1952      1.105   hannken 	if (error)
   1953      1.105   hannken 		return error;
   1954       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_openextattr), &a));
   1955      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1956       1.72        ad 	return error;
   1957       1.51   thorpej }
   1958       1.51   thorpej 
   1959       1.51   thorpej const int vop_deleteextattr_vp_offsets[] = {
   1960       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_deleteextattr_args,a_vp),
   1961       1.51   thorpej 	VDESC_NO_OFFSET
   1962       1.51   thorpej };
   1963       1.51   thorpej const struct vnodeop_desc vop_deleteextattr_desc = {
   1964       1.67     pooka 	VOP_DELETEEXTATTR_DESCOFFSET,
   1965       1.51   thorpej 	"vop_deleteextattr",
   1966       1.51   thorpej 	0,
   1967       1.51   thorpej 	vop_deleteextattr_vp_offsets,
   1968       1.51   thorpej 	VDESC_NO_OFFSET,
   1969       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_deleteextattr_args, a_cred),
   1970       1.51   thorpej 	VDESC_NO_OFFSET,
   1971       1.51   thorpej };
   1972       1.51   thorpej int
   1973       1.60   thorpej VOP_DELETEEXTATTR(struct vnode *vp,
   1974       1.60   thorpej     int attrnamespace,
   1975       1.60   thorpej     const char *name,
   1976       1.73     pooka     kauth_cred_t cred)
   1977       1.51   thorpej {
   1978       1.72        ad 	int error;
   1979       1.72        ad 	bool mpsafe;
   1980       1.51   thorpej 	struct vop_deleteextattr_args a;
   1981      1.105   hannken 	struct mount *mp;
   1982       1.51   thorpej 	a.a_desc = VDESC(vop_deleteextattr);
   1983       1.51   thorpej 	a.a_vp = vp;
   1984       1.51   thorpej 	a.a_attrnamespace = attrnamespace;
   1985       1.51   thorpej 	a.a_name = name;
   1986       1.51   thorpej 	a.a_cred = cred;
   1987      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   1988      1.105   hannken 	if (error)
   1989      1.105   hannken 		return error;
   1990       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_deleteextattr), &a));
   1991      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   1992       1.72        ad 	return error;
   1993       1.51   thorpej }
   1994       1.51   thorpej 
   1995       1.51   thorpej const int vop_setextattr_vp_offsets[] = {
   1996       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_setextattr_args,a_vp),
   1997       1.51   thorpej 	VDESC_NO_OFFSET
   1998       1.51   thorpej };
   1999       1.51   thorpej const struct vnodeop_desc vop_setextattr_desc = {
   2000       1.67     pooka 	VOP_SETEXTATTR_DESCOFFSET,
   2001       1.51   thorpej 	"vop_setextattr",
   2002       1.51   thorpej 	0,
   2003       1.51   thorpej 	vop_setextattr_vp_offsets,
   2004       1.51   thorpej 	VDESC_NO_OFFSET,
   2005       1.51   thorpej 	VOPARG_OFFSETOF(struct vop_setextattr_args, a_cred),
   2006       1.51   thorpej 	VDESC_NO_OFFSET,
   2007       1.51   thorpej };
   2008       1.51   thorpej int
   2009       1.60   thorpej VOP_SETEXTATTR(struct vnode *vp,
   2010       1.60   thorpej     int attrnamespace,
   2011       1.60   thorpej     const char *name,
   2012       1.60   thorpej     struct uio *uio,
   2013       1.73     pooka     kauth_cred_t cred)
   2014       1.51   thorpej {
   2015       1.72        ad 	int error;
   2016       1.72        ad 	bool mpsafe;
   2017       1.51   thorpej 	struct vop_setextattr_args a;
   2018      1.105   hannken 	struct mount *mp;
   2019       1.51   thorpej 	a.a_desc = VDESC(vop_setextattr);
   2020       1.51   thorpej 	a.a_vp = vp;
   2021       1.51   thorpej 	a.a_attrnamespace = attrnamespace;
   2022       1.51   thorpej 	a.a_name = name;
   2023       1.51   thorpej 	a.a_uio = uio;
   2024       1.51   thorpej 	a.a_cred = cred;
   2025      1.105   hannken 	error = vop_pre(vp, &mp, &mpsafe, FST_NO);
   2026      1.105   hannken 	if (error)
   2027      1.105   hannken 		return error;
   2028       1.72        ad 	error = (VCALL(vp, VOFFSET(vop_setextattr), &a));
   2029      1.105   hannken 	vop_post(vp, mp, mpsafe, FST_NO);
   2030       1.72        ad 	return error;
   2031       1.51   thorpej }
   2032       1.51   thorpej 
   2033       1.33  jdolecek const struct vnodeop_desc * const vfs_op_descs[] = {
   2034        1.1       cgd 	&vop_default_desc,	/* MUST BE FIRST */
   2035        1.1       cgd 
   2036       1.88   hannken 	&vop_bwrite_desc,
   2037  1.112.6.1   thorpej 	&vop_parsepath_desc,
   2038        1.1       cgd 	&vop_lookup_desc,
   2039        1.1       cgd 	&vop_create_desc,
   2040        1.1       cgd 	&vop_mknod_desc,
   2041        1.1       cgd 	&vop_open_desc,
   2042        1.1       cgd 	&vop_close_desc,
   2043        1.1       cgd 	&vop_access_desc,
   2044      1.111  christos 	&vop_accessx_desc,
   2045        1.1       cgd 	&vop_getattr_desc,
   2046        1.1       cgd 	&vop_setattr_desc,
   2047        1.1       cgd 	&vop_read_desc,
   2048        1.1       cgd 	&vop_write_desc,
   2049       1.93  dholland 	&vop_fallocate_desc,
   2050       1.93  dholland 	&vop_fdiscard_desc,
   2051        1.1       cgd 	&vop_ioctl_desc,
   2052       1.18  wrstuden 	&vop_fcntl_desc,
   2053        1.3   mycroft 	&vop_poll_desc,
   2054       1.40  jdolecek 	&vop_kqfilter_desc,
   2055       1.10      fvdl 	&vop_revoke_desc,
   2056        1.1       cgd 	&vop_mmap_desc,
   2057        1.1       cgd 	&vop_fsync_desc,
   2058        1.1       cgd 	&vop_seek_desc,
   2059        1.1       cgd 	&vop_remove_desc,
   2060        1.1       cgd 	&vop_link_desc,
   2061        1.1       cgd 	&vop_rename_desc,
   2062        1.1       cgd 	&vop_mkdir_desc,
   2063        1.1       cgd 	&vop_rmdir_desc,
   2064        1.1       cgd 	&vop_symlink_desc,
   2065        1.1       cgd 	&vop_readdir_desc,
   2066        1.1       cgd 	&vop_readlink_desc,
   2067        1.1       cgd 	&vop_abortop_desc,
   2068        1.1       cgd 	&vop_inactive_desc,
   2069        1.1       cgd 	&vop_reclaim_desc,
   2070        1.1       cgd 	&vop_lock_desc,
   2071        1.1       cgd 	&vop_unlock_desc,
   2072        1.1       cgd 	&vop_bmap_desc,
   2073       1.46   hannken 	&vop_strategy_desc,
   2074        1.1       cgd 	&vop_print_desc,
   2075        1.1       cgd 	&vop_islocked_desc,
   2076        1.1       cgd 	&vop_pathconf_desc,
   2077        1.1       cgd 	&vop_advlock_desc,
   2078        1.1       cgd 	&vop_whiteout_desc,
   2079       1.26       chs 	&vop_getpages_desc,
   2080       1.26       chs 	&vop_putpages_desc,
   2081      1.111  christos 	&vop_getacl_desc,
   2082      1.111  christos 	&vop_setacl_desc,
   2083      1.111  christos 	&vop_aclcheck_desc,
   2084       1.51   thorpej 	&vop_closeextattr_desc,
   2085       1.51   thorpej 	&vop_getextattr_desc,
   2086       1.51   thorpej 	&vop_listextattr_desc,
   2087       1.51   thorpej 	&vop_openextattr_desc,
   2088       1.51   thorpej 	&vop_deleteextattr_desc,
   2089       1.51   thorpej 	&vop_setextattr_desc,
   2090        1.1       cgd 	NULL
   2091        1.1       cgd };
   2092