Simplify vn_lock(), VOP_LOCK(), and VOP_UNLOCK() by removing the thread_t
[dragonfly.git] / sys / kern / vfs_vopops.c
CommitLineData
2d3e977e
MD
1/*
2 *
3 * Copyright (c) 2004 The DragonFly Project. All rights reserved.
4 *
5 * This code is derived from software contributed to The DragonFly Project
6 * by Matthew Dillon <dillon@backplane.com>
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * 3. Neither the name of The DragonFly Project nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific, prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
ca466bae 35 * $DragonFly: src/sys/kern/vfs_vopops.c,v 1.24 2006/05/05 21:15:09 dillon Exp $
2d3e977e
MD
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/buf.h>
41#include <sys/conf.h>
42#include <sys/dirent.h>
43#include <sys/domain.h>
44#include <sys/eventhandler.h>
45#include <sys/fcntl.h>
46#include <sys/kernel.h>
47#include <sys/kthread.h>
48#include <sys/malloc.h>
49#include <sys/mbuf.h>
50#include <sys/mount.h>
51#include <sys/proc.h>
52#include <sys/namei.h>
53#include <sys/reboot.h>
54#include <sys/socket.h>
55#include <sys/stat.h>
56#include <sys/sysctl.h>
57#include <sys/syslog.h>
58#include <sys/vmmeter.h>
59#include <sys/vnode.h>
0961aa92 60#include <sys/vfsops.h>
2d3e977e
MD
61
62#include <machine/limits.h>
63
64#include <vm/vm.h>
65#include <vm/vm_object.h>
66#include <vm/vm_extern.h>
67#include <vm/vm_kern.h>
68#include <vm/pmap.h>
69#include <vm/vm_map.h>
70#include <vm/vm_page.h>
71#include <vm/vm_pager.h>
72#include <vm/vnode_pager.h>
73#include <vm/vm_zone.h>
74
75#include <sys/buf2.h>
76#include <sys/thread2.h>
77
78#define VOFFNAME(name) __CONCAT(__CONCAT(vop_,name),_vp_offsets)
79#define VDESCNAME(name) __CONCAT(__CONCAT(vop_,name),_desc)
80#define VARGSSTRUCT(name) struct __CONCAT(__CONCAT(vop_,name),_args)
81
82#define VNODEOP_DESC_INIT(name, flags, vpoffs, vpp, cred, proc, comp) \
83 struct vnodeop_desc VDESCNAME(name) = { \
84 __offsetof(struct vop_ops, __CONCAT(vop_, name)), \
85 #name, flags, vpoffs, vpp, cred, proc, comp }
86
87#define VNODEOP_DESC_INIT_SIMPLE(name) \
88 VNODEOP_DESC_INIT(name, 0, NULL, \
89 VDESC_NO_OFFSET, \
90 VDESC_NO_OFFSET, \
91 VDESC_NO_OFFSET, \
92 VDESC_NO_OFFSET)
93
94#define VNODEOP_DESC_INIT_VP(name) \
95 static int VOFFNAME(name)[] = { \
96 __offsetof(VARGSSTRUCT(name), a_vp), \
97 VDESC_NO_OFFSET }; \
98 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
99 VDESC_NO_OFFSET, \
100 VDESC_NO_OFFSET, \
101 VDESC_NO_OFFSET, \
102 VDESC_NO_OFFSET)
103
104#define VNODEOP_DESC_INIT_VP_VPP(name) \
105 static int VOFFNAME(name)[] = { \
106 __offsetof(VARGSSTRUCT(name), a_vp), \
107 VDESC_NO_OFFSET }; \
108 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
109 __offsetof(VARGSSTRUCT(name), a_vpp), \
110 VDESC_NO_OFFSET, \
111 VDESC_NO_OFFSET, \
112 VDESC_NO_OFFSET)
113
114#define VNODEOP_DESC_INIT_VP_CRED(name) \
115 static int VOFFNAME(name)[] = { \
116 __offsetof(VARGSSTRUCT(name), a_vp), \
117 VDESC_NO_OFFSET }; \
118 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
119 VDESC_NO_OFFSET, \
120 __offsetof(VARGSSTRUCT(name), a_cred), \
121 VDESC_NO_OFFSET, \
122 VDESC_NO_OFFSET)
123
690a3127
MD
124#define VNODEOP_DESC_INIT_NCP(name) \
125 VNODEOP_DESC_INIT(name, 0, NULL, \
126 VDESC_NO_OFFSET, \
127 VDESC_NO_OFFSET, \
128 VDESC_NO_OFFSET, \
129 VDESC_NO_OFFSET)
130
fad57d0e
MD
131#define VNODEOP_DESC_INIT_NCP2_CRED(name) \
132 VNODEOP_DESC_INIT(name, 0, NULL, \
133 VDESC_NO_OFFSET, \
134 __offsetof(VARGSSTRUCT(name), a_cred), \
135 VDESC_NO_OFFSET, \
136 VDESC_NO_OFFSET)
137
21739618
MD
138#define VNODEOP_DESC_INIT_NCP_CRED(name) \
139 VNODEOP_DESC_INIT(name, 0, NULL, \
140 VDESC_NO_OFFSET, \
141 __offsetof(VARGSSTRUCT(name), a_cred), \
142 VDESC_NO_OFFSET, \
143 VDESC_NO_OFFSET)
144
fad57d0e
MD
145#define VNODEOP_DESC_INIT_NCP_VP_CRED(name) \
146 static int VOFFNAME(name)[] = { \
147 __offsetof(VARGSSTRUCT(name), a_vp), \
148 VDESC_NO_OFFSET }; \
149 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
150 VDESC_NO_OFFSET, \
151 __offsetof(VARGSSTRUCT(name), a_cred), \
152 VDESC_NO_OFFSET, \
153 VDESC_NO_OFFSET)
154
155#define VNODEOP_DESC_INIT_NCP_CRED_VPP(name) \
156 VNODEOP_DESC_INIT(name, 0, NULL, \
157 __offsetof(VARGSSTRUCT(name), a_vpp), \
158 __offsetof(VARGSSTRUCT(name), a_cred), \
159 VDESC_NO_OFFSET, \
160 VDESC_NO_OFFSET)
161
2d3e977e
MD
162#define VNODEOP_DESC_INIT_DVP_VPP_CNP(name) \
163 static int VOFFNAME(name)[] = { \
164 __offsetof(VARGSSTRUCT(name), a_dvp), \
165 VDESC_NO_OFFSET }; \
166 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
167 __offsetof(VARGSSTRUCT(name), a_vpp), \
168 VDESC_NO_OFFSET, \
169 VDESC_NO_OFFSET, \
170 __offsetof(VARGSSTRUCT(name), a_cnp))
171
fad57d0e
MD
172#define VNODEOP_DESC_INIT_DVP_VPP_CRED(name) \
173 static int VOFFNAME(name)[] = { \
174 __offsetof(VARGSSTRUCT(name), a_dvp), \
175 VDESC_NO_OFFSET }; \
176 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
177 __offsetof(VARGSSTRUCT(name), a_vpp), \
178 __offsetof(VARGSSTRUCT(name), a_cred), \
179 VDESC_NO_OFFSET, \
180 VDESC_NO_OFFSET)
181
2d3e977e
MD
182#define VNODEOP_DESC_INIT_DVP_CNP(name) \
183 static int VOFFNAME(name)[] = { \
184 __offsetof(VARGSSTRUCT(name), a_dvp), \
185 VDESC_NO_OFFSET }; \
186 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
187 VDESC_NO_OFFSET, \
188 VDESC_NO_OFFSET, \
189 VDESC_NO_OFFSET, \
190 __offsetof(VARGSSTRUCT(name), a_cnp))
191
192#define VNODEOP_DESC_INIT_DVP_VP_CNP(name) \
193 static int VOFFNAME(name)[] = { \
194 __offsetof(VARGSSTRUCT(name), a_dvp), \
195 __offsetof(VARGSSTRUCT(name), a_vp), \
196 VDESC_NO_OFFSET }; \
197 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
198 VDESC_NO_OFFSET, \
199 VDESC_NO_OFFSET, \
200 VDESC_NO_OFFSET, \
201 __offsetof(VARGSSTRUCT(name), a_cnp))
202
203#define VNODEOP_DESC_INIT_TDVP_VP_CNP(name) \
204 static int VOFFNAME(name)[] = { \
205 __offsetof(VARGSSTRUCT(name), a_tdvp), \
206 __offsetof(VARGSSTRUCT(name), a_vp), \
207 VDESC_NO_OFFSET }; \
208 VNODEOP_DESC_INIT(name, 0, VOFFNAME(name), \
209 VDESC_NO_OFFSET, \
210 VDESC_NO_OFFSET, \
211 VDESC_NO_OFFSET, \
212 __offsetof(VARGSSTRUCT(name), a_cnp))
213
214VNODEOP_DESC_INIT_SIMPLE(default);
215VNODEOP_DESC_INIT_VP(islocked);
e62afb5f
MD
216VNODEOP_DESC_INIT_DVP_VPP_CNP(old_lookup);
217VNODEOP_DESC_INIT_DVP_VPP_CNP(old_create);
218VNODEOP_DESC_INIT_DVP_CNP(old_whiteout);
219VNODEOP_DESC_INIT_DVP_VPP_CNP(old_mknod);
2d3e977e
MD
220VNODEOP_DESC_INIT_VP_CRED(open);
221VNODEOP_DESC_INIT_VP(close);
222VNODEOP_DESC_INIT_VP_CRED(access);
223VNODEOP_DESC_INIT_VP(getattr);
224VNODEOP_DESC_INIT_VP_CRED(setattr);
225VNODEOP_DESC_INIT_VP_CRED(read);
226VNODEOP_DESC_INIT_VP_CRED(write);
2d3e977e
MD
227VNODEOP_DESC_INIT_VP_CRED(ioctl);
228VNODEOP_DESC_INIT_VP_CRED(poll);
229VNODEOP_DESC_INIT_VP(kqfilter);
230VNODEOP_DESC_INIT_VP(revoke);
231VNODEOP_DESC_INIT_VP_CRED(mmap);
232VNODEOP_DESC_INIT_VP(fsync);
e62afb5f
MD
233VNODEOP_DESC_INIT_DVP_VP_CNP(old_remove);
234VNODEOP_DESC_INIT_TDVP_VP_CNP(old_link);
235
236static int VOFFNAME(old_rename)[] = {
237 __offsetof(VARGSSTRUCT(old_rename), a_fdvp),
238 __offsetof(VARGSSTRUCT(old_rename), a_fvp),
239 __offsetof(VARGSSTRUCT(old_rename), a_tdvp),
240 __offsetof(VARGSSTRUCT(old_rename), a_tvp),
2d3e977e
MD
241 VDESC_NO_OFFSET
242};
e62afb5f 243VNODEOP_DESC_INIT(old_rename,
2d3e977e 244 VDESC_VP0_WILLRELE|VDESC_VP1_WILLRELE|
3446c007
MD
245 VDESC_VP2_WILLRELE|VDESC_VP3_WILLRELE|
246 VDESC_VP2_WILLUNLOCK|VDESC_VP3_WILLUNLOCK, /* tdvp and tvp */
e62afb5f 247 VOFFNAME(old_rename),
2d3e977e
MD
248 VDESC_NO_OFFSET,
249 VDESC_NO_OFFSET,
250 VDESC_NO_OFFSET,
e62afb5f 251 __offsetof(VARGSSTRUCT(old_rename), a_fcnp));
fad57d0e 252
e62afb5f
MD
253VNODEOP_DESC_INIT_DVP_VPP_CNP(old_mkdir);
254VNODEOP_DESC_INIT_DVP_VP_CNP(old_rmdir);
255VNODEOP_DESC_INIT_DVP_VPP_CNP(old_symlink);
2d3e977e
MD
256VNODEOP_DESC_INIT_VP_CRED(readdir);
257VNODEOP_DESC_INIT_VP_CRED(readlink);
258VNODEOP_DESC_INIT_VP(inactive);
259VNODEOP_DESC_INIT_VP(reclaim);
260VNODEOP_DESC_INIT_VP(lock);
261VNODEOP_DESC_INIT_VP(unlock);
262VNODEOP_DESC_INIT_VP_VPP(bmap);
263VNODEOP_DESC_INIT_VP(strategy);
264VNODEOP_DESC_INIT_VP(print);
265VNODEOP_DESC_INIT_VP(pathconf);
266VNODEOP_DESC_INIT_VP(advlock);
267VNODEOP_DESC_INIT_VP_CRED(balloc);
268VNODEOP_DESC_INIT_VP(reallocblks);
269VNODEOP_DESC_INIT_VP(getpages);
270VNODEOP_DESC_INIT_VP(putpages);
271VNODEOP_DESC_INIT_VP(freeblks);
2d3e977e
MD
272VNODEOP_DESC_INIT_VP_CRED(getacl);
273VNODEOP_DESC_INIT_VP_CRED(setacl);
274VNODEOP_DESC_INIT_VP_CRED(aclcheck);
275VNODEOP_DESC_INIT_VP_CRED(getextattr);
276VNODEOP_DESC_INIT_VP_CRED(setextattr);
949ecb9b 277VNODEOP_DESC_INIT_SIMPLE(mountctl);
cbe54d63 278
fad57d0e
MD
279VNODEOP_DESC_INIT_NCP_CRED(nresolve);
280VNODEOP_DESC_INIT_DVP_VPP_CRED(nlookupdotdot);
281VNODEOP_DESC_INIT_NCP_CRED_VPP(ncreate);
282VNODEOP_DESC_INIT_NCP_CRED_VPP(nmkdir);
283VNODEOP_DESC_INIT_NCP_CRED_VPP(nmknod);
284VNODEOP_DESC_INIT_NCP_VP_CRED(nlink);
285VNODEOP_DESC_INIT_NCP_CRED_VPP(nsymlink);
286VNODEOP_DESC_INIT_NCP_CRED(nwhiteout);
287VNODEOP_DESC_INIT_NCP_CRED(nremove);
288VNODEOP_DESC_INIT_NCP_CRED(nrmdir);
289VNODEOP_DESC_INIT_NCP2_CRED(nrename);
290
6ddb7618
MD
291#define DO_OPS(ops, error, ap, vop_field) \
292 error = ops->vop_field(ap);
2d3e977e 293
0961aa92
MD
294/************************************************************************
295 * PRIMARY HIGH LEVEL VNODE OPERATIONS CALLS *
296 ************************************************************************
297 *
298 * These procedures are called directly from the kernel and/or fileops
299 * code to perform file/device operations on the system.
e62afb5f
MD
300 *
301 * NOTE: The old namespace api functions such as vop_rename() are no longer
302 * available for general use and have been renamed to vop_old_*(). Only
303 * the code in vfs_default.c is allowed to call those ops.
0961aa92
MD
304 */
305
2d3e977e 306int
0961aa92 307vop_islocked(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
308{
309 struct vop_islocked_args ap;
cbe54d63 310 int error;
2d3e977e
MD
311
312 ap.a_head.a_desc = &vop_islocked_desc;
0961aa92 313 ap.a_head.a_ops = ops;
2d3e977e
MD
314 ap.a_vp = vp;
315 ap.a_td = td;
cbe54d63
MD
316
317 DO_OPS(ops, error, &ap, vop_islocked);
318 return(error);
2d3e977e
MD
319}
320
321int
e62afb5f 322vop_old_lookup(struct vop_ops *ops, struct vnode *dvp,
26b67a34 323 struct vnode **vpp, struct componentname *cnp)
2d3e977e 324{
e62afb5f 325 struct vop_old_lookup_args ap;
cbe54d63 326 int error;
2d3e977e 327
e62afb5f 328 ap.a_head.a_desc = &vop_old_lookup_desc;
0961aa92 329 ap.a_head.a_ops = ops;
2d3e977e 330 ap.a_dvp = dvp;
2d3e977e 331 ap.a_vpp = vpp;
2d3e977e 332 ap.a_cnp = cnp;
cbe54d63 333
e62afb5f 334 DO_OPS(ops, error, &ap, vop_old_lookup);
cbe54d63 335 return(error);
2d3e977e
MD
336}
337
338int
e62afb5f 339vop_old_create(struct vop_ops *ops, struct vnode *dvp,
0961aa92 340 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e 341{
e62afb5f 342 struct vop_old_create_args ap;
cbe54d63 343 int error;
2d3e977e 344
e62afb5f 345 ap.a_head.a_desc = &vop_old_create_desc;
0961aa92 346 ap.a_head.a_ops = ops;
2d3e977e 347 ap.a_dvp = dvp;
2d3e977e
MD
348 ap.a_vpp = vpp;
349 ap.a_cnp = cnp;
350 ap.a_vap = vap;
cbe54d63 351
e62afb5f 352 DO_OPS(ops, error, &ap, vop_old_create);
cbe54d63 353 return(error);
2d3e977e
MD
354}
355
356int
e62afb5f 357vop_old_whiteout(struct vop_ops *ops, struct vnode *dvp,
0961aa92 358 struct componentname *cnp, int flags)
2d3e977e 359{
e62afb5f 360 struct vop_old_whiteout_args ap;
cbe54d63 361 int error;
2d3e977e 362
e62afb5f 363 ap.a_head.a_desc = &vop_old_whiteout_desc;
0961aa92 364 ap.a_head.a_ops = ops;
2d3e977e 365 ap.a_dvp = dvp;
2d3e977e
MD
366 ap.a_cnp = cnp;
367 ap.a_flags = flags;
cbe54d63 368
e62afb5f 369 DO_OPS(ops, error, &ap, vop_old_whiteout);
cbe54d63 370 return(error);
2d3e977e
MD
371}
372
373int
e62afb5f 374vop_old_mknod(struct vop_ops *ops, struct vnode *dvp,
0961aa92 375 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e 376{
e62afb5f 377 struct vop_old_mknod_args ap;
cbe54d63 378 int error;
2d3e977e 379
e62afb5f 380 ap.a_head.a_desc = &vop_old_mknod_desc;
0961aa92 381 ap.a_head.a_ops = ops;
2d3e977e 382 ap.a_dvp = dvp;
2d3e977e
MD
383 ap.a_vpp = vpp;
384 ap.a_cnp = cnp;
385 ap.a_vap = vap;
cbe54d63 386
e62afb5f 387 DO_OPS(ops, error, &ap, vop_old_mknod);
cbe54d63 388 return(error);
2d3e977e
MD
389}
390
391int
0961aa92 392vop_open(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
fad57d0e 393 struct file *fp, struct thread *td)
2d3e977e
MD
394{
395 struct vop_open_args ap;
cbe54d63 396 int error;
2d3e977e
MD
397
398 ap.a_head.a_desc = &vop_open_desc;
0961aa92 399 ap.a_head.a_ops = ops;
2d3e977e 400 ap.a_vp = vp;
fad57d0e 401 ap.a_fp = fp;
2d3e977e
MD
402 ap.a_mode = mode;
403 ap.a_cred = cred;
404 ap.a_td = td;
cbe54d63
MD
405
406 DO_OPS(ops, error, &ap, vop_open);
407 return(error);
2d3e977e
MD
408}
409
410int
0961aa92 411vop_close(struct vop_ops *ops, struct vnode *vp, int fflag, struct thread *td)
2d3e977e
MD
412{
413 struct vop_close_args ap;
cbe54d63 414 int error;
2d3e977e
MD
415
416 ap.a_head.a_desc = &vop_close_desc;
0961aa92 417 ap.a_head.a_ops = ops;
2d3e977e
MD
418 ap.a_vp = vp;
419 ap.a_fflag = fflag;
420 ap.a_td = td;
cbe54d63
MD
421
422 DO_OPS(ops, error, &ap, vop_close);
423 return(error);
2d3e977e
MD
424}
425
426int
0961aa92
MD
427vop_access(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
428 struct thread *td)
2d3e977e
MD
429{
430 struct vop_access_args ap;
cbe54d63 431 int error;
2d3e977e
MD
432
433 ap.a_head.a_desc = &vop_access_desc;
0961aa92 434 ap.a_head.a_ops = ops;
2d3e977e
MD
435 ap.a_vp = vp;
436 ap.a_mode = mode;
437 ap.a_cred = cred;
438 ap.a_td = td;
cbe54d63
MD
439
440 DO_OPS(ops, error, &ap, vop_access);
441 return(error);
2d3e977e
MD
442}
443
444int
0961aa92
MD
445vop_getattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
446 struct thread *td)
2d3e977e
MD
447{
448 struct vop_getattr_args ap;
dc1be39c 449 struct namecache *ncp;
cbe54d63 450 int error;
2d3e977e
MD
451
452 ap.a_head.a_desc = &vop_getattr_desc;
0961aa92 453 ap.a_head.a_ops = ops;
2d3e977e
MD
454 ap.a_vp = vp;
455 ap.a_vap = vap;
456 ap.a_td = td;
cbe54d63
MD
457
458 DO_OPS(ops, error, &ap, vop_getattr);
dc1be39c
MD
459 if ((ops->vv_flags & VVF_SUPPORTS_FSMID) == 0) {
460 if ((ncp = TAILQ_FIRST(&vp->v_namecache)) != NULL) {
461 if (ncp->nc_flag & NCF_FSMID) {
462 ncp->nc_flag &= ~NCF_FSMID;
463 ++ncp->nc_fsmid;
464 }
465 vap->va_fsmid = ncp->nc_fsmid;
466 }
467 }
cbe54d63 468 return(error);
2d3e977e
MD
469}
470
471int
0961aa92
MD
472vop_setattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
473 struct ucred *cred, struct thread *td)
2d3e977e
MD
474{
475 struct vop_setattr_args ap;
cbe54d63 476 int error;
2d3e977e
MD
477
478 ap.a_head.a_desc = &vop_setattr_desc;
0961aa92 479 ap.a_head.a_ops = ops;
2d3e977e
MD
480 ap.a_vp = vp;
481 ap.a_vap = vap;
482 ap.a_cred = cred;
483 ap.a_td = td;
cbe54d63
MD
484
485 DO_OPS(ops, error, &ap, vop_setattr);
7d15906a
MD
486 if (error == 0)
487 cache_update_fsmid_vp(vp);
cbe54d63 488 return(error);
2d3e977e
MD
489}
490
491int
0961aa92
MD
492vop_read(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
493 struct ucred *cred)
2d3e977e
MD
494{
495 struct vop_read_args ap;
cbe54d63 496 int error;
2d3e977e
MD
497
498 ap.a_head.a_desc = &vop_read_desc;
0961aa92 499 ap.a_head.a_ops = ops;
2d3e977e
MD
500 ap.a_vp = vp;
501 ap.a_uio = uio;
502 ap.a_ioflag = ioflag;
503 ap.a_cred = cred;
cbe54d63
MD
504
505 DO_OPS(ops, error, &ap, vop_read);
506 return(error);
2d3e977e
MD
507}
508
509int
0961aa92
MD
510vop_write(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
511 struct ucred *cred)
2d3e977e
MD
512{
513 struct vop_write_args ap;
cbe54d63 514 int error;
2d3e977e
MD
515
516 ap.a_head.a_desc = &vop_write_desc;
0961aa92 517 ap.a_head.a_ops = ops;
2d3e977e
MD
518 ap.a_vp = vp;
519 ap.a_uio = uio;
520 ap.a_ioflag = ioflag;
521 ap.a_cred = cred;
cbe54d63
MD
522
523 DO_OPS(ops, error, &ap, vop_write);
7d15906a
MD
524 if (error == 0)
525 cache_update_fsmid_vp(vp);
cbe54d63 526 return(error);
2d3e977e
MD
527}
528
2d3e977e 529int
0961aa92
MD
530vop_ioctl(struct vop_ops *ops, struct vnode *vp, u_long command, caddr_t data,
531 int fflag, struct ucred *cred,
532 struct thread *td)
2d3e977e
MD
533{
534 struct vop_ioctl_args ap;
cbe54d63 535 int error;
2d3e977e
MD
536
537 ap.a_head.a_desc = &vop_ioctl_desc;
0961aa92 538 ap.a_head.a_ops = ops;
2d3e977e
MD
539 ap.a_vp = vp;
540 ap.a_command = command;
541 ap.a_data = data;
542 ap.a_fflag = fflag;
543 ap.a_cred = cred;
544 ap.a_td = td;
cbe54d63
MD
545
546 DO_OPS(ops, error, &ap, vop_ioctl);
547 return(error);
2d3e977e
MD
548}
549
550int
0961aa92
MD
551vop_poll(struct vop_ops *ops, struct vnode *vp, int events, struct ucred *cred,
552 struct thread *td)
2d3e977e
MD
553{
554 struct vop_poll_args ap;
cbe54d63 555 int error;
2d3e977e
MD
556
557 ap.a_head.a_desc = &vop_poll_desc;
0961aa92 558 ap.a_head.a_ops = ops;
2d3e977e
MD
559 ap.a_vp = vp;
560 ap.a_events = events;
561 ap.a_cred = cred;
562 ap.a_td = td;
cbe54d63
MD
563
564 DO_OPS(ops, error, &ap, vop_poll);
565 return(error);
2d3e977e
MD
566}
567
568int
0961aa92 569vop_kqfilter(struct vop_ops *ops, struct vnode *vp, struct knote *kn)
2d3e977e
MD
570{
571 struct vop_kqfilter_args ap;
cbe54d63 572 int error;
2d3e977e
MD
573
574 ap.a_head.a_desc = &vop_kqfilter_desc;
0961aa92 575 ap.a_head.a_ops = ops;
2d3e977e
MD
576 ap.a_vp = vp;
577 ap.a_kn = kn;
cbe54d63
MD
578
579 DO_OPS(ops, error, &ap, vop_kqfilter);
580 return(error);
2d3e977e
MD
581}
582
583int
0961aa92 584vop_revoke(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
585{
586 struct vop_revoke_args ap;
cbe54d63 587 int error;
2d3e977e
MD
588
589 ap.a_head.a_desc = &vop_revoke_desc;
0961aa92 590 ap.a_head.a_ops = ops;
2d3e977e
MD
591 ap.a_vp = vp;
592 ap.a_flags = flags;
cbe54d63
MD
593
594 DO_OPS(ops, error, &ap, vop_revoke);
595 return(error);
2d3e977e
MD
596}
597
598int
0961aa92
MD
599vop_mmap(struct vop_ops *ops, struct vnode *vp, int fflags, struct ucred *cred,
600 struct thread *td)
2d3e977e
MD
601{
602 struct vop_mmap_args ap;
cbe54d63 603 int error;
2d3e977e
MD
604
605 ap.a_head.a_desc = &vop_mmap_desc;
0961aa92 606 ap.a_head.a_ops = ops;
2d3e977e
MD
607 ap.a_vp = vp;
608 ap.a_fflags = fflags;
609 ap.a_cred = cred;
610 ap.a_td = td;
cbe54d63
MD
611
612 DO_OPS(ops, error, &ap, vop_mmap);
613 return(error);
2d3e977e
MD
614}
615
616int
0961aa92 617vop_fsync(struct vop_ops *ops, struct vnode *vp, int waitfor, struct thread *td)
2d3e977e
MD
618{
619 struct vop_fsync_args ap;
cbe54d63 620 int error;
2d3e977e
MD
621
622 ap.a_head.a_desc = &vop_fsync_desc;
0961aa92 623 ap.a_head.a_ops = ops;
2d3e977e
MD
624 ap.a_vp = vp;
625 ap.a_waitfor = waitfor;
626 ap.a_td = td;
cbe54d63
MD
627
628 DO_OPS(ops, error, &ap, vop_fsync);
629 return(error);
2d3e977e
MD
630}
631
632int
e62afb5f 633vop_old_remove(struct vop_ops *ops, struct vnode *dvp,
0961aa92 634 struct vnode *vp, struct componentname *cnp)
2d3e977e 635{
e62afb5f 636 struct vop_old_remove_args ap;
cbe54d63 637 int error;
2d3e977e 638
e62afb5f 639 ap.a_head.a_desc = &vop_old_remove_desc;
0961aa92 640 ap.a_head.a_ops = ops;
2d3e977e 641 ap.a_dvp = dvp;
2d3e977e
MD
642 ap.a_vp = vp;
643 ap.a_cnp = cnp;
cbe54d63 644
e62afb5f 645 DO_OPS(ops, error, &ap, vop_old_remove);
cbe54d63 646 return(error);
2d3e977e
MD
647}
648
21739618 649int
e62afb5f 650vop_old_link(struct vop_ops *ops, struct vnode *tdvp,
0961aa92 651 struct vnode *vp, struct componentname *cnp)
2d3e977e 652{
e62afb5f 653 struct vop_old_link_args ap;
cbe54d63 654 int error;
2d3e977e 655
e62afb5f 656 ap.a_head.a_desc = &vop_old_link_desc;
0961aa92 657 ap.a_head.a_ops = ops;
2d3e977e 658 ap.a_tdvp = tdvp;
2d3e977e
MD
659 ap.a_vp = vp;
660 ap.a_cnp = cnp;
cbe54d63 661
e62afb5f 662 DO_OPS(ops, error, &ap, vop_old_link);
cbe54d63 663 return(error);
2d3e977e
MD
664}
665
666int
e62afb5f 667vop_old_rename(struct vop_ops *ops,
fad57d0e
MD
668 struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp,
669 struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp)
2d3e977e 670{
e62afb5f 671 struct vop_old_rename_args ap;
cbe54d63 672 int error;
2d3e977e 673
e62afb5f 674 ap.a_head.a_desc = &vop_old_rename_desc;
0961aa92 675 ap.a_head.a_ops = ops;
2d3e977e 676 ap.a_fdvp = fdvp;
2d3e977e
MD
677 ap.a_fvp = fvp;
678 ap.a_fcnp = fcnp;
679 ap.a_tdvp = tdvp;
2d3e977e
MD
680 ap.a_tvp = tvp;
681 ap.a_tcnp = tcnp;
cbe54d63 682
e62afb5f 683 DO_OPS(ops, error, &ap, vop_old_rename);
cbe54d63 684 return(error);
2d3e977e
MD
685}
686
687int
e62afb5f 688vop_old_mkdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 689 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e 690{
e62afb5f 691 struct vop_old_mkdir_args ap;
cbe54d63 692 int error;
2d3e977e 693
e62afb5f 694 ap.a_head.a_desc = &vop_old_mkdir_desc;
0961aa92 695 ap.a_head.a_ops = ops;
2d3e977e 696 ap.a_dvp = dvp;
2d3e977e
MD
697 ap.a_vpp = vpp;
698 ap.a_cnp = cnp;
699 ap.a_vap = vap;
cbe54d63 700
e62afb5f 701 DO_OPS(ops, error, &ap, vop_old_mkdir);
cbe54d63 702 return(error);
2d3e977e
MD
703}
704
705int
e62afb5f 706vop_old_rmdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 707 struct vnode *vp, struct componentname *cnp)
2d3e977e 708{
e62afb5f 709 struct vop_old_rmdir_args ap;
cbe54d63 710 int error;
2d3e977e 711
e62afb5f 712 ap.a_head.a_desc = &vop_old_rmdir_desc;
0961aa92 713 ap.a_head.a_ops = ops;
2d3e977e 714 ap.a_dvp = dvp;
2d3e977e
MD
715 ap.a_vp = vp;
716 ap.a_cnp = cnp;
cbe54d63 717
e62afb5f 718 DO_OPS(ops, error, &ap, vop_old_rmdir);
cbe54d63 719 return(error);
2d3e977e
MD
720}
721
722int
e62afb5f 723vop_old_symlink(struct vop_ops *ops, struct vnode *dvp,
0961aa92
MD
724 struct vnode **vpp, struct componentname *cnp,
725 struct vattr *vap, char *target)
2d3e977e 726{
e62afb5f 727 struct vop_old_symlink_args ap;
cbe54d63 728 int error;
2d3e977e 729
e62afb5f 730 ap.a_head.a_desc = &vop_old_symlink_desc;
0961aa92 731 ap.a_head.a_ops = ops;
2d3e977e 732 ap.a_dvp = dvp;
2d3e977e
MD
733 ap.a_vpp = vpp;
734 ap.a_cnp = cnp;
735 ap.a_vap = vap;
736 ap.a_target = target;
cbe54d63 737
e62afb5f 738 DO_OPS(ops, error, &ap, vop_old_symlink);
cbe54d63 739 return(error);
2d3e977e
MD
740}
741
742int
0961aa92
MD
743vop_readdir(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
744 struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies)
2d3e977e
MD
745{
746 struct vop_readdir_args ap;
cbe54d63 747 int error;
2d3e977e
MD
748
749 ap.a_head.a_desc = &vop_readdir_desc;
0961aa92 750 ap.a_head.a_ops = ops;
2d3e977e
MD
751 ap.a_vp = vp;
752 ap.a_uio = uio;
753 ap.a_cred = cred;
754 ap.a_eofflag = eofflag;
755 ap.a_ncookies = ncookies;
756 ap.a_cookies = cookies;
cbe54d63
MD
757
758 DO_OPS(ops, error, &ap, vop_readdir);
759 return(error);
2d3e977e
MD
760}
761
762int
0961aa92
MD
763vop_readlink(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
764 struct ucred *cred)
2d3e977e
MD
765{
766 struct vop_readlink_args ap;
cbe54d63 767 int error;
2d3e977e
MD
768
769 ap.a_head.a_desc = &vop_readlink_desc;
0961aa92 770 ap.a_head.a_ops = ops;
2d3e977e
MD
771 ap.a_vp = vp;
772 ap.a_uio = uio;
773 ap.a_cred = cred;
cbe54d63
MD
774
775 DO_OPS(ops, error, &ap, vop_readlink);
776 return(error);
2d3e977e
MD
777}
778
779int
0961aa92 780vop_inactive(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
781{
782 struct vop_inactive_args ap;
cbe54d63 783 int error;
2d3e977e
MD
784
785 ap.a_head.a_desc = &vop_inactive_desc;
0961aa92 786 ap.a_head.a_ops = ops;
2d3e977e
MD
787 ap.a_vp = vp;
788 ap.a_td = td;
cbe54d63
MD
789
790 DO_OPS(ops, error, &ap, vop_inactive);
791 return(error);
2d3e977e
MD
792}
793
794int
6b008938 795vop_reclaim(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
796{
797 struct vop_reclaim_args ap;
cbe54d63 798 int error;
2d3e977e
MD
799
800 ap.a_head.a_desc = &vop_reclaim_desc;
0961aa92 801 ap.a_head.a_ops = ops;
2d3e977e
MD
802 ap.a_vp = vp;
803 ap.a_td = td;
cbe54d63
MD
804
805 DO_OPS(ops, error, &ap, vop_reclaim);
806 return(error);
2d3e977e
MD
807}
808
809int
ca466bae 810vop_lock(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
811{
812 struct vop_lock_args ap;
cbe54d63 813 int error;
2d3e977e
MD
814
815 ap.a_head.a_desc = &vop_lock_desc;
0961aa92 816 ap.a_head.a_ops = ops;
2d3e977e 817 ap.a_vp = vp;
2d3e977e 818 ap.a_flags = flags;
cbe54d63
MD
819
820 DO_OPS(ops, error, &ap, vop_lock);
821 return(error);
2d3e977e
MD
822}
823
824int
ca466bae 825vop_unlock(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
826{
827 struct vop_unlock_args ap;
cbe54d63 828 int error;
2d3e977e
MD
829
830 ap.a_head.a_desc = &vop_unlock_desc;
0961aa92 831 ap.a_head.a_ops = ops;
2d3e977e 832 ap.a_vp = vp;
2d3e977e 833 ap.a_flags = flags;
cbe54d63
MD
834
835 DO_OPS(ops, error, &ap, vop_unlock);
836 return(error);
2d3e977e
MD
837}
838
839int
54078292
MD
840vop_bmap(struct vop_ops *ops, struct vnode *vp, off_t loffset,
841 struct vnode **vpp, off_t *doffsetp, int *runp, int *runb)
2d3e977e
MD
842{
843 struct vop_bmap_args ap;
cbe54d63 844 int error;
2d3e977e
MD
845
846 ap.a_head.a_desc = &vop_bmap_desc;
0961aa92 847 ap.a_head.a_ops = ops;
2d3e977e 848 ap.a_vp = vp;
54078292 849 ap.a_loffset = loffset;
2d3e977e 850 ap.a_vpp = vpp;
54078292 851 ap.a_doffsetp = doffsetp;
2d3e977e
MD
852 ap.a_runp = runp;
853 ap.a_runb = runb;
cbe54d63
MD
854
855 DO_OPS(ops, error, &ap, vop_bmap);
856 return(error);
2d3e977e
MD
857}
858
859int
81b5c339 860vop_strategy(struct vop_ops *ops, struct vnode *vp, struct bio *bio)
2d3e977e
MD
861{
862 struct vop_strategy_args ap;
cbe54d63 863 int error;
2d3e977e
MD
864
865 ap.a_head.a_desc = &vop_strategy_desc;
0961aa92 866 ap.a_head.a_ops = ops;
2d3e977e 867 ap.a_vp = vp;
81b5c339 868 ap.a_bio = bio;
cbe54d63
MD
869
870 DO_OPS(ops, error, &ap, vop_strategy);
10f3fee5 871 if (error == 0 && bio->bio_buf->b_cmd != BUF_CMD_READ)
7d15906a 872 cache_update_fsmid_vp(vp);
cbe54d63 873 return(error);
2d3e977e
MD
874}
875
876int
0961aa92 877vop_print(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
878{
879 struct vop_print_args ap;
cbe54d63 880 int error;
2d3e977e
MD
881
882 ap.a_head.a_desc = &vop_print_desc;
0961aa92 883 ap.a_head.a_ops = ops;
2d3e977e 884 ap.a_vp = vp;
cbe54d63
MD
885
886 DO_OPS(ops, error, &ap, vop_print);
887 return(error);
2d3e977e
MD
888}
889
890int
0961aa92
MD
891vop_pathconf(struct vop_ops *ops, struct vnode *vp, int name,
892 register_t *retval)
2d3e977e
MD
893{
894 struct vop_pathconf_args ap;
cbe54d63 895 int error;
2d3e977e
MD
896
897 ap.a_head.a_desc = &vop_pathconf_desc;
0961aa92 898 ap.a_head.a_ops = ops;
2d3e977e
MD
899 ap.a_vp = vp;
900 ap.a_name = name;
901 ap.a_retval = retval;
cbe54d63
MD
902
903 DO_OPS(ops, error, &ap, vop_pathconf);
904 return(error);
2d3e977e
MD
905}
906
907int
0961aa92
MD
908vop_advlock(struct vop_ops *ops, struct vnode *vp, caddr_t id, int op,
909 struct flock *fl, int flags)
2d3e977e
MD
910{
911 struct vop_advlock_args ap;
cbe54d63 912 int error;
2d3e977e
MD
913
914 ap.a_head.a_desc = &vop_advlock_desc;
0961aa92 915 ap.a_head.a_ops = ops;
2d3e977e
MD
916 ap.a_vp = vp;
917 ap.a_id = id;
918 ap.a_op = op;
919 ap.a_fl = fl;
920 ap.a_flags = flags;
cbe54d63
MD
921
922 DO_OPS(ops, error, &ap, vop_advlock);
923 return(error);
2d3e977e
MD
924}
925
926int
0961aa92
MD
927vop_balloc(struct vop_ops *ops, struct vnode *vp, off_t startoffset,
928 int size, struct ucred *cred, int flags,
929 struct buf **bpp)
2d3e977e
MD
930{
931 struct vop_balloc_args ap;
cbe54d63 932 int error;
2d3e977e
MD
933
934 ap.a_head.a_desc = &vop_balloc_desc;
0961aa92 935 ap.a_head.a_ops = ops;
2d3e977e
MD
936 ap.a_vp = vp;
937 ap.a_startoffset = startoffset;
938 ap.a_size = size;
939 ap.a_cred = cred;
940 ap.a_flags = flags;
941 ap.a_bpp = bpp;
cbe54d63
MD
942
943 DO_OPS(ops, error, &ap, vop_balloc);
944 return(error);
2d3e977e
MD
945}
946
947int
0961aa92
MD
948vop_reallocblks(struct vop_ops *ops, struct vnode *vp,
949 struct cluster_save *buflist)
2d3e977e
MD
950{
951 struct vop_reallocblks_args ap;
cbe54d63 952 int error;
2d3e977e
MD
953
954 ap.a_head.a_desc = &vop_reallocblks_desc;
0961aa92 955 ap.a_head.a_ops = ops;
2d3e977e
MD
956 ap.a_vp = vp;
957 ap.a_buflist = buflist;
cbe54d63
MD
958
959 DO_OPS(ops, error, &ap, vop_reallocblks);
960 return(error);
2d3e977e
MD
961}
962
963int
0961aa92
MD
964vop_getpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
965 int reqpage, vm_ooffset_t offset)
2d3e977e
MD
966{
967 struct vop_getpages_args ap;
cbe54d63 968 int error;
2d3e977e
MD
969
970 ap.a_head.a_desc = &vop_getpages_desc;
0961aa92 971 ap.a_head.a_ops = ops;
2d3e977e
MD
972 ap.a_vp = vp;
973 ap.a_m = m;
974 ap.a_count = count;
975 ap.a_reqpage = reqpage;
976 ap.a_offset = offset;
cbe54d63
MD
977
978 DO_OPS(ops, error, &ap, vop_getpages);
979 return(error);
2d3e977e
MD
980}
981
982int
0961aa92
MD
983vop_putpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
984 int sync, int *rtvals, vm_ooffset_t offset)
2d3e977e
MD
985{
986 struct vop_putpages_args ap;
cbe54d63 987 int error;
2d3e977e
MD
988
989 ap.a_head.a_desc = &vop_putpages_desc;
0961aa92 990 ap.a_head.a_ops = ops;
2d3e977e
MD
991 ap.a_vp = vp;
992 ap.a_m = m;
993 ap.a_count = count;
994 ap.a_sync = sync;
995 ap.a_rtvals = rtvals;
996 ap.a_offset = offset;
cbe54d63
MD
997
998 DO_OPS(ops, error, &ap, vop_putpages);
7d15906a
MD
999 if (error == 0)
1000 cache_update_fsmid_vp(vp);
cbe54d63 1001 return(error);
2d3e977e
MD
1002}
1003
1004int
54078292 1005vop_freeblks(struct vop_ops *ops, struct vnode *vp, off_t offset, int length)
2d3e977e
MD
1006{
1007 struct vop_freeblks_args ap;
cbe54d63 1008 int error;
2d3e977e
MD
1009
1010 ap.a_head.a_desc = &vop_freeblks_desc;
0961aa92 1011 ap.a_head.a_ops = ops;
2d3e977e 1012 ap.a_vp = vp;
54078292 1013 ap.a_offset = offset;
2d3e977e 1014 ap.a_length = length;
cbe54d63
MD
1015
1016 DO_OPS(ops, error, &ap, vop_freeblks);
1017 return(error);
2d3e977e
MD
1018}
1019
2d3e977e 1020int
0961aa92
MD
1021vop_getacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1022 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1023{
1024 struct vop_getacl_args ap;
cbe54d63 1025 int error;
2d3e977e
MD
1026
1027 ap.a_head.a_desc = &vop_getacl_desc;
0961aa92 1028 ap.a_head.a_ops = ops;
2d3e977e
MD
1029 ap.a_vp = vp;
1030 ap.a_type = type;
1031 ap.a_aclp = aclp;
1032 ap.a_cred = cred;
1033 ap.a_td = td;
cbe54d63
MD
1034
1035 DO_OPS(ops, error, &ap, vop_getacl);
1036 return(error);
2d3e977e
MD
1037}
1038
1039int
0961aa92
MD
1040vop_setacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1041 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1042{
1043 struct vop_setacl_args ap;
cbe54d63 1044 int error;
2d3e977e
MD
1045
1046 ap.a_head.a_desc = &vop_setacl_desc;
0961aa92 1047 ap.a_head.a_ops = ops;
2d3e977e
MD
1048 ap.a_vp = vp;
1049 ap.a_type = type;
1050 ap.a_aclp = aclp;
1051 ap.a_cred = cred;
1052 ap.a_td = td;
cbe54d63
MD
1053
1054 DO_OPS(ops, error, &ap, vop_setacl);
7d15906a
MD
1055 if (error == 0)
1056 cache_update_fsmid_vp(vp);
cbe54d63 1057 return(error);
2d3e977e
MD
1058}
1059
1060int
0961aa92
MD
1061vop_aclcheck(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1062 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1063{
1064 struct vop_aclcheck_args ap;
cbe54d63 1065 int error;
2d3e977e
MD
1066
1067 ap.a_head.a_desc = &vop_aclcheck_desc;
0961aa92 1068 ap.a_head.a_ops = ops;
2d3e977e
MD
1069 ap.a_vp = vp;
1070 ap.a_type = type;
1071 ap.a_aclp = aclp;
1072 ap.a_cred = cred;
1073 ap.a_td = td;
cbe54d63
MD
1074
1075 DO_OPS(ops, error, &ap, vop_aclcheck);
1076 return(error);
2d3e977e
MD
1077}
1078
1079int
0961aa92
MD
1080vop_getextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1081 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1082{
1083 struct vop_getextattr_args ap;
cbe54d63 1084 int error;
2d3e977e
MD
1085
1086 ap.a_head.a_desc = &vop_getextattr_desc;
0961aa92 1087 ap.a_head.a_ops = ops;
2d3e977e
MD
1088 ap.a_vp = vp;
1089 ap.a_name = name;
1090 ap.a_uio = uio;
1091 ap.a_cred = cred;
1092 ap.a_td = td;
cbe54d63
MD
1093
1094 DO_OPS(ops, error, &ap, vop_getextattr);
1095 return(error);
2d3e977e
MD
1096}
1097
1098int
0961aa92
MD
1099vop_setextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1100 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1101{
1102 struct vop_setextattr_args ap;
cbe54d63 1103 int error;
2d3e977e
MD
1104
1105 ap.a_head.a_desc = &vop_setextattr_desc;
0961aa92 1106 ap.a_head.a_ops = ops;
2d3e977e
MD
1107 ap.a_vp = vp;
1108 ap.a_name = name;
1109 ap.a_uio = uio;
1110 ap.a_cred = cred;
1111 ap.a_td = td;
cbe54d63
MD
1112
1113 DO_OPS(ops, error, &ap, vop_setextattr);
7d15906a
MD
1114 if (error == 0)
1115 cache_update_fsmid_vp(vp);
cbe54d63 1116 return(error);
2d3e977e
MD
1117}
1118
cbe54d63 1119int
2281065e
MD
1120vop_mountctl(struct vop_ops *ops, int op, struct file *fp,
1121 const void *ctl, int ctllen, void *buf, int buflen, int *res)
cbe54d63 1122{
949ecb9b 1123 struct vop_mountctl_args ap;
cbe54d63
MD
1124 int error;
1125
949ecb9b 1126 ap.a_head.a_desc = &vop_mountctl_desc;
cbe54d63
MD
1127 ap.a_head.a_ops = ops;
1128 ap.a_op = op;
949ecb9b 1129 ap.a_ctl = ctl;
2281065e 1130 ap.a_fp = fp;
949ecb9b
MD
1131 ap.a_ctllen = ctllen;
1132 ap.a_buf = buf;
1133 ap.a_buflen = buflen;
1134 ap.a_res = res;
cbe54d63 1135
949ecb9b 1136 DO_OPS(ops, error, &ap, vop_mountctl);
cbe54d63 1137 return(error);
0961aa92
MD
1138}
1139
fad57d0e
MD
1140/*
1141 * NEW API FUNCTIONS
1142 *
1143 * nresolve takes a locked ncp and a cred and resolves the ncp into a
1144 * positive or negative hit.
1145 *
1146 * The namecache is automatically adjusted by this function. The ncp
1147 * is left locked on return.
1148 */
1149int
1150vop_nresolve(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1151{
1152 struct vop_nresolve_args ap;
1153 int error;
1154
1155 ap.a_head.a_desc = &vop_nresolve_desc;
1156 ap.a_head.a_ops = ops;
1157 ap.a_ncp = ncp;
1158 ap.a_cred = cred;
1159
1160 DO_OPS(ops, error, &ap, vop_nresolve);
1161 return(error);
1162}
1163
1164/*
1165 * nlookupdotdot takes an unlocked directory, dvp, and looks up "..", returning
1166 * a locked parent directory in *vpp. If an error occurs *vpp will be NULL.
1167 */
1168int
1169vop_nlookupdotdot(struct vop_ops *ops, struct vnode *dvp,
1170 struct vnode **vpp, struct ucred *cred)
1171{
1172 struct vop_nlookupdotdot_args ap;
1173 int error;
1174
1175 ap.a_head.a_desc = &vop_nlookupdotdot_desc;
1176 ap.a_head.a_ops = ops;
1177 ap.a_dvp = dvp;
1178 ap.a_vpp = vpp;
1179 ap.a_cred = cred;
1180
1181 DO_OPS(ops, error, &ap, vop_nlookupdotdot);
1182 return(error);
1183}
1184
1185/*
1186 * ncreate takes a locked, resolved ncp that typically represents a negative
1187 * cache hit and creates the file or node specified by the ncp, cred, and
1188 * vattr. If no error occurs a locked vnode is returned in *vpp.
1189 *
1190 * The namecache is automatically adjusted by this function. The ncp
1191 * is left locked on return.
1192 */
1193int
1194vop_ncreate(struct vop_ops *ops, struct namecache *ncp,
1195 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1196{
1197 struct vop_ncreate_args ap;
1198 int error;
1199
1200 ap.a_head.a_desc = &vop_ncreate_desc;
1201 ap.a_head.a_ops = ops;
1202 ap.a_ncp = ncp;
1203 ap.a_vpp = vpp;
1204 ap.a_cred = cred;
1205 ap.a_vap = vap;
1206
1207 DO_OPS(ops, error, &ap, vop_ncreate);
7d15906a
MD
1208 if (error == 0 && *vpp)
1209 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1210 return(error);
1211}
1212
1213/*
1214 * nmkdir takes a locked, resolved ncp that typically represents a negative
1215 * cache hit and creates the directory specified by the ncp, cred, and
1216 * vattr. If no error occurs a locked vnode is returned in *vpp.
1217 *
1218 * The namecache is automatically adjusted by this function. The ncp
1219 * is left locked on return.
1220 */
1221int
1222vop_nmkdir(struct vop_ops *ops, struct namecache *ncp,
1223 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1224{
1225 struct vop_nmkdir_args ap;
1226 int error;
1227
1228 ap.a_head.a_desc = &vop_nmkdir_desc;
1229 ap.a_head.a_ops = ops;
1230 ap.a_ncp = ncp;
1231 ap.a_vpp = vpp;
1232 ap.a_cred = cred;
1233 ap.a_vap = vap;
1234
1235 DO_OPS(ops, error, &ap, vop_nmkdir);
7d15906a
MD
1236 if (error == 0 && *vpp)
1237 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1238 return(error);
1239}
1240
1241/*
1242 * nmknod takes a locked, resolved ncp that typically represents a negative
1243 * cache hit and creates the node specified by the ncp, cred, and
1244 * vattr. If no error occurs a locked vnode is returned in *vpp.
1245 *
1246 * The namecache is automatically adjusted by this function. The ncp
1247 * is left locked on return.
1248 */
1249int
1250vop_nmknod(struct vop_ops *ops, struct namecache *ncp,
1251 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1252{
1253 struct vop_nmknod_args ap;
1254 int error;
1255
1256 ap.a_head.a_desc = &vop_nmknod_desc;
1257 ap.a_head.a_ops = ops;
1258 ap.a_ncp = ncp;
1259 ap.a_vpp = vpp;
1260 ap.a_cred = cred;
1261 ap.a_vap = vap;
1262
1263 DO_OPS(ops, error, &ap, vop_nmknod);
7d15906a
MD
1264 if (error == 0 && *vpp)
1265 cache_update_fsmid_vp(*vpp);
fad57d0e
MD
1266 return(error);
1267}
1268
1269/*
1270 * nlink takes a locked, resolved ncp that typically represents a negative
1271 * cache hit and creates the node specified by the ncp, cred, and
1272 * existing vnode. The passed vp must be locked and will remain locked
1273 * on return, as does the ncp, whether an error occurs or not.
1274 *
1275 * The namecache is automatically adjusted by this function. The ncp
1276 * is left locked on return.
1277 */
1278int
1279vop_nlink(struct vop_ops *ops, struct namecache *ncp,
1280 struct vnode *vp, struct ucred *cred)
1281{
1282 struct vop_nlink_args ap;
1283 int error;
1284
1285 ap.a_head.a_desc = &vop_nlink_desc;
1286 ap.a_head.a_ops = ops;
1287 ap.a_ncp = ncp;
1288 ap.a_vp = vp;
1289 ap.a_cred = cred;
1290
1291 DO_OPS(ops, error, &ap, vop_nlink);
7d15906a
MD
1292 if (error == 0)
1293 cache_update_fsmid(ncp);
fad57d0e
MD
1294 return(error);
1295}
1296
1297/*
1298 * nsymlink takes a locked, resolved ncp that typically represents a negative
1299 * cache hit and creates a symbolic link based on cred, vap, and target (the
1300 * contents of the link). If no error occurs a locked vnode is returned in
1301 * *vpp.
1302 *
1303 * The namecache is automatically adjusted by this function. The ncp
1304 * is left locked on return.
1305 */
1306int
1307vop_nsymlink(struct vop_ops *ops, struct namecache *ncp,
1308 struct vnode **vpp, struct ucred *cred,
1309 struct vattr *vap, char *target)
1310{
1311 struct vop_nsymlink_args ap;
1312 int error;
1313
1314 ap.a_head.a_desc = &vop_nsymlink_desc;
1315 ap.a_head.a_ops = ops;
1316 ap.a_ncp = ncp;
1317 ap.a_vpp = vpp;
1318 ap.a_cred = cred;
1319 ap.a_vap = vap;
1320 ap.a_target = target;
1321
1322 DO_OPS(ops, error, &ap, vop_nsymlink);
7d15906a
MD
1323 if (error == 0)
1324 cache_update_fsmid(ncp);
fad57d0e
MD
1325 return(error);
1326}
1327
1328/*
1329 * nwhiteout takes a locked, resolved ncp that can represent a positive or
1330 * negative hit and executes the whiteout function specified in flags.
1331 *
1332 * The namecache is automatically adjusted by this function. The ncp
1333 * is left locked on return.
1334 */
1335int
1336vop_nwhiteout(struct vop_ops *ops, struct namecache *ncp,
1337 struct ucred *cred, int flags)
1338{
1339 struct vop_nwhiteout_args ap;
1340 int error;
1341
1342 ap.a_head.a_desc = &vop_nwhiteout_desc;
1343 ap.a_head.a_ops = ops;
1344 ap.a_ncp = ncp;
1345 ap.a_cred = cred;
1346 ap.a_flags = flags;
1347
1348 DO_OPS(ops, error, &ap, vop_nwhiteout);
7d15906a
MD
1349 if (error == 0)
1350 cache_update_fsmid(ncp);
fad57d0e
MD
1351 return(error);
1352}
1353
1354/*
1355 * nremove takes a locked, resolved ncp that generally represents a
1356 * positive hit and removes the file.
1357 *
1358 * The namecache is automatically adjusted by this function. The ncp
1359 * is left locked on return.
1360 */
1361int
1362vop_nremove(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1363{
1364 struct vop_nremove_args ap;
1365 int error;
1366
1367 ap.a_head.a_desc = &vop_nremove_desc;
1368 ap.a_head.a_ops = ops;
1369 ap.a_ncp = ncp;
1370 ap.a_cred = cred;
1371
1372 DO_OPS(ops, error, &ap, vop_nremove);
7d15906a
MD
1373 if (error == 0)
1374 cache_update_fsmid(ncp);
fad57d0e
MD
1375 return(error);
1376}
1377
1378/*
1379 * nrmdir takes a locked, resolved ncp that generally represents a
1380 * directory and removes the directory.
1381 *
1382 * The namecache is automatically adjusted by this function. The ncp
1383 * is left locked on return.
1384 */
1385int
1386vop_nrmdir(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1387{
1388 struct vop_nrmdir_args ap;
1389 int error;
1390
1391 ap.a_head.a_desc = &vop_nrmdir_desc;
1392 ap.a_head.a_ops = ops;
1393 ap.a_ncp = ncp;
1394 ap.a_cred = cred;
1395
1396 DO_OPS(ops, error, &ap, vop_nrmdir);
7d15906a
MD
1397 if (error == 0)
1398 cache_update_fsmid(ncp);
fad57d0e
MD
1399 return(error);
1400}
1401
1402/*
1403 * nrename takes TWO locked, resolved ncp's and the cred of the caller
1404 * and renames the source ncp to the target ncp. The target ncp may
1405 * represent a positive or negative hit.
1406 *
1407 * The namecache is automatically adjusted by this function. The ncp
1408 * is left locked on return. The source ncp is typically changed to
1409 * a negative cache hit and the target ncp typically takes on the
1410 * source ncp's underlying file.
1411 */
1412int
1413vop_nrename(struct vop_ops *ops, struct namecache *fncp,
1414 struct namecache *tncp, struct ucred *cred)
1415{
1416 struct vop_nrename_args ap;
1417 int error;
1418
1419 ap.a_head.a_desc = &vop_nrename_desc;
1420 ap.a_head.a_ops = ops;
1421 ap.a_fncp = fncp;
1422 ap.a_tncp = tncp;
1423 ap.a_cred = cred;
1424
1425 DO_OPS(ops, error, &ap, vop_nrename);
7d15906a
MD
1426 if (error == 0) {
1427 cache_update_fsmid(fncp);
1428 cache_update_fsmid(tncp);
1429 }
fad57d0e
MD
1430 return(error);
1431}
1432
0961aa92
MD
1433/************************************************************************
1434 * PRIMARY VNODE OPERATIONS FORWARDING CALLS *
1435 ************************************************************************
1436 *
1437 * These procedures are called from VFSs such as unionfs and nullfs
1438 * when they wish to forward an operation on one VFS to another. The
1439 * argument structure/message is modified and then directly passed to the
1440 * appropriate routine. This routines may also be called by initiators
1441 * who have an argument structure in hand rather then discreet arguments.
1442 */
1443int
1444vop_vnoperate_ap(struct vop_generic_args *ap)
1445{
cbe54d63
MD
1446 struct vop_ops *ops;
1447 int error;
1448
1449 ops = ap->a_ops;
6ddb7618
MD
1450 error = VOCALL(ops, ap);
1451
1452 return (error);
1453}
1454
1455/*
1456 * This routine is called by the cache coherency layer to execute the actual
1457 * VFS operation. If a journaling layer is present we call though it, else
1458 * we call the native VOP functions.
1459 */
1460int
1461vop_cache_operate_ap(struct vop_generic_args *ap)
1462{
1463 struct vop_ops *ops;
1464 int error;
1465
1466 ops = ap->a_ops;
1467 if (ops->vv_mount->mnt_vn_journal_ops)
1468 error = VOCALL(ops->vv_mount->mnt_vn_journal_ops, ap);
1469 else
1470 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1471 return (error);
1472}
1473
1474
1475/*
1476 * This routine is called by the journaling layer to execute the actual
1477 * VFS operation.
1478 */
1479int
1480vop_journal_operate_ap(struct vop_generic_args *ap)
1481{
1482 struct vop_ops *ops;
1483 int error;
1484
1485 ops = ap->a_ops;
1486 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1487
cbe54d63 1488 return (error);
0961aa92
MD
1489}
1490
1491int
1492vop_islocked_ap(struct vop_islocked_args *ap)
1493{
cbe54d63
MD
1494 int error;
1495
1496 DO_OPS(ap->a_head.a_ops, error, ap, vop_islocked);
1497 return(error);
0961aa92
MD
1498}
1499
0961aa92
MD
1500int
1501vop_open_ap(struct vop_open_args *ap)
1502{
cbe54d63
MD
1503 int error;
1504
1505 DO_OPS(ap->a_head.a_ops, error, ap, vop_open);
1506 return(error);
0961aa92
MD
1507}
1508
1509int
1510vop_close_ap(struct vop_close_args *ap)
1511{
cbe54d63
MD
1512 int error;
1513
1514 DO_OPS(ap->a_head.a_ops, error, ap, vop_close);
1515 return(error);
0961aa92
MD
1516}
1517
1518int
1519vop_access_ap(struct vop_access_args *ap)
1520{
cbe54d63
MD
1521 int error;
1522
1523 DO_OPS(ap->a_head.a_ops, error, ap, vop_access);
1524 return(error);
0961aa92
MD
1525}
1526
1527int
1528vop_getattr_ap(struct vop_getattr_args *ap)
1529{
cbe54d63
MD
1530 int error;
1531
1532 DO_OPS(ap->a_head.a_ops, error, ap, vop_getattr);
1533 return(error);
0961aa92
MD
1534}
1535
1536int
1537vop_setattr_ap(struct vop_setattr_args *ap)
1538{
cbe54d63
MD
1539 int error;
1540
1541 DO_OPS(ap->a_head.a_ops, error, ap, vop_setattr);
1542 return(error);
0961aa92
MD
1543}
1544
1545int
1546vop_read_ap(struct vop_read_args *ap)
1547{
cbe54d63
MD
1548 int error;
1549
1550 DO_OPS(ap->a_head.a_ops, error, ap, vop_read);
1551 return(error);
0961aa92
MD
1552}
1553
1554int
1555vop_write_ap(struct vop_write_args *ap)
1556{
cbe54d63
MD
1557 int error;
1558
1559 DO_OPS(ap->a_head.a_ops, error, ap, vop_write);
1560 return(error);
0961aa92
MD
1561}
1562
0961aa92
MD
1563int
1564vop_ioctl_ap(struct vop_ioctl_args *ap)
1565{
cbe54d63
MD
1566 int error;
1567
1568 DO_OPS(ap->a_head.a_ops, error, ap, vop_ioctl);
1569 return(error);
0961aa92
MD
1570}
1571
1572int
1573vop_poll_ap(struct vop_poll_args *ap)
1574{
cbe54d63
MD
1575 int error;
1576
1577 DO_OPS(ap->a_head.a_ops, error, ap, vop_poll);
1578 return(error);
0961aa92
MD
1579}
1580
1581int
1582vop_kqfilter_ap(struct vop_kqfilter_args *ap)
1583{
cbe54d63
MD
1584 int error;
1585
1586 DO_OPS(ap->a_head.a_ops, error, ap, vop_kqfilter);
1587 return(error);
0961aa92
MD
1588}
1589
1590int
1591vop_revoke_ap(struct vop_revoke_args *ap)
1592{
cbe54d63
MD
1593 int error;
1594
1595 DO_OPS(ap->a_head.a_ops, error, ap, vop_revoke);
1596 return(error);
0961aa92
MD
1597}
1598
1599int
1600vop_mmap_ap(struct vop_mmap_args *ap)
1601{
cbe54d63
MD
1602 int error;
1603
1604 DO_OPS(ap->a_head.a_ops, error, ap, vop_mmap);
1605 return(error);
0961aa92
MD
1606}
1607
1608int
1609vop_fsync_ap(struct vop_fsync_args *ap)
1610{
cbe54d63
MD
1611 int error;
1612
1613 DO_OPS(ap->a_head.a_ops, error, ap, vop_fsync);
1614 return(error);
0961aa92
MD
1615}
1616
0961aa92
MD
1617int
1618vop_readdir_ap(struct vop_readdir_args *ap)
1619{
cbe54d63
MD
1620 int error;
1621
1622 DO_OPS(ap->a_head.a_ops, error, ap, vop_readdir);
1623 return(error);
0961aa92
MD
1624}
1625
1626int
1627vop_readlink_ap(struct vop_readlink_args *ap)
1628{
cbe54d63
MD
1629 int error;
1630
1631 DO_OPS(ap->a_head.a_ops, error, ap, vop_readlink);
1632 return(error);
0961aa92
MD
1633}
1634
1635int
1636vop_inactive_ap(struct vop_inactive_args *ap)
1637{
cbe54d63
MD
1638 int error;
1639
1640 DO_OPS(ap->a_head.a_ops, error, ap, vop_inactive);
1641 return(error);
0961aa92
MD
1642}
1643
1644int
1645vop_reclaim_ap(struct vop_reclaim_args *ap)
1646{
cbe54d63
MD
1647 int error;
1648
1649 DO_OPS(ap->a_head.a_ops, error, ap, vop_reclaim);
1650 return(error);
0961aa92
MD
1651}
1652
1653int
1654vop_lock_ap(struct vop_lock_args *ap)
1655{
cbe54d63
MD
1656 int error;
1657
1658 DO_OPS(ap->a_head.a_ops, error, ap, vop_lock);
1659 return(error);
0961aa92
MD
1660}
1661
1662int
1663vop_unlock_ap(struct vop_unlock_args *ap)
1664{
cbe54d63
MD
1665 int error;
1666
1667 DO_OPS(ap->a_head.a_ops, error, ap, vop_unlock);
1668 return(error);
0961aa92
MD
1669}
1670
1671int
1672vop_bmap_ap(struct vop_bmap_args *ap)
1673{
cbe54d63
MD
1674 int error;
1675
1676 DO_OPS(ap->a_head.a_ops, error, ap, vop_bmap);
1677 return(error);
0961aa92
MD
1678}
1679
1680int
1681vop_strategy_ap(struct vop_strategy_args *ap)
1682{
cbe54d63
MD
1683 int error;
1684
1685 DO_OPS(ap->a_head.a_ops, error, ap, vop_strategy);
1686 return(error);
0961aa92
MD
1687}
1688
1689int
1690vop_print_ap(struct vop_print_args *ap)
1691{
cbe54d63
MD
1692 int error;
1693
1694 DO_OPS(ap->a_head.a_ops, error, ap, vop_print);
1695 return(error);
0961aa92
MD
1696}
1697
1698int
1699vop_pathconf_ap(struct vop_pathconf_args *ap)
1700{
cbe54d63
MD
1701 int error;
1702
1703 DO_OPS(ap->a_head.a_ops, error, ap, vop_pathconf);
1704 return(error);
0961aa92
MD
1705}
1706
1707int
1708vop_advlock_ap(struct vop_advlock_args *ap)
1709{
cbe54d63
MD
1710 int error;
1711
1712 DO_OPS(ap->a_head.a_ops, error, ap, vop_advlock);
1713 return(error);
0961aa92
MD
1714}
1715
1716int
1717vop_balloc_ap(struct vop_balloc_args *ap)
1718{
cbe54d63
MD
1719 int error;
1720
1721 DO_OPS(ap->a_head.a_ops, error, ap, vop_balloc);
1722 return(error);
0961aa92
MD
1723}
1724
1725int
1726vop_reallocblks_ap(struct vop_reallocblks_args *ap)
1727{
cbe54d63
MD
1728 int error;
1729
1730 DO_OPS(ap->a_head.a_ops, error, ap, vop_reallocblks);
1731 return(error);
0961aa92
MD
1732}
1733
1734int
1735vop_getpages_ap(struct vop_getpages_args *ap)
1736{
cbe54d63
MD
1737 int error;
1738
1739 DO_OPS(ap->a_head.a_ops, error, ap, vop_getpages);
1740 return(error);
0961aa92
MD
1741}
1742
1743int
1744vop_putpages_ap(struct vop_putpages_args *ap)
1745{
cbe54d63
MD
1746 int error;
1747
1748 DO_OPS(ap->a_head.a_ops, error, ap, vop_putpages);
1749 return(error);
0961aa92
MD
1750}
1751
1752int
1753vop_freeblks_ap(struct vop_freeblks_args *ap)
1754{
cbe54d63
MD
1755 int error;
1756
1757 DO_OPS(ap->a_head.a_ops, error, ap, vop_freeblks);
1758 return(error);
0961aa92
MD
1759}
1760
0961aa92
MD
1761int
1762vop_getacl_ap(struct vop_getacl_args *ap)
1763{
cbe54d63
MD
1764 int error;
1765
1766 DO_OPS(ap->a_head.a_ops, error, ap, vop_getacl);
1767 return(error);
0961aa92
MD
1768}
1769
1770int
1771vop_setacl_ap(struct vop_setacl_args *ap)
1772{
cbe54d63
MD
1773 int error;
1774
1775 DO_OPS(ap->a_head.a_ops, error, ap, vop_setacl);
1776 return(error);
0961aa92
MD
1777}
1778
1779int
1780vop_aclcheck_ap(struct vop_aclcheck_args *ap)
1781{
cbe54d63
MD
1782 int error;
1783
1784 DO_OPS(ap->a_head.a_ops, error, ap, vop_aclcheck);
1785 return(error);
0961aa92
MD
1786}
1787
1788int
1789vop_getextattr_ap(struct vop_getextattr_args *ap)
1790{
cbe54d63
MD
1791 int error;
1792
1793 DO_OPS(ap->a_head.a_ops, error, ap, vop_getextattr);
1794 return(error);
0961aa92
MD
1795}
1796
1797int
1798vop_setextattr_ap(struct vop_setextattr_args *ap)
1799{
cbe54d63
MD
1800 int error;
1801
1802 DO_OPS(ap->a_head.a_ops, error, ap, vop_setextattr);
1803 return(error);
0961aa92
MD
1804}
1805
cbe54d63 1806int
949ecb9b 1807vop_mountctl_ap(struct vop_mountctl_args *ap)
cbe54d63
MD
1808{
1809 int error;
1810
949ecb9b 1811 DO_OPS(ap->a_head.a_ops, error, ap, vop_mountctl);
cbe54d63 1812 return(error);
2d3e977e
MD
1813}
1814
fad57d0e
MD
1815int
1816vop_nresolve_ap(struct vop_nresolve_args *ap)
1817{
1818 int error;
1819
1820 DO_OPS(ap->a_head.a_ops, error, ap, vop_nresolve);
1821 return(error);
1822}
1823
1824int
1825vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap)
1826{
1827 int error;
1828
1829 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlookupdotdot);
1830 return(error);
1831}
1832
1833int
1834vop_ncreate_ap(struct vop_ncreate_args *ap)
1835{
1836 int error;
1837
1838 DO_OPS(ap->a_head.a_ops, error, ap, vop_ncreate);
1839 return(error);
1840}
1841
1842int
1843vop_nmkdir_ap(struct vop_nmkdir_args *ap)
1844{
1845 int error;
1846
1847 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmkdir);
1848 return(error);
1849}
1850
1851int
1852vop_nmknod_ap(struct vop_nmknod_args *ap)
1853{
1854 int error;
1855
1856 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmknod);
1857 return(error);
1858}
1859
1860int
1861vop_nlink_ap(struct vop_nlink_args *ap)
1862{
1863 int error;
1864
1865 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlink);
1866 return(error);
1867}
1868
1869int
1870vop_nsymlink_ap(struct vop_nsymlink_args *ap)
1871{
1872 int error;
1873
1874 DO_OPS(ap->a_head.a_ops, error, ap, vop_nsymlink);
1875 return(error);
1876}
1877
1878int
1879vop_nwhiteout_ap(struct vop_nwhiteout_args *ap)
1880{
1881 int error;
1882
1883 DO_OPS(ap->a_head.a_ops, error, ap, vop_nwhiteout);
1884 return(error);
1885}
1886
1887int
1888vop_nremove_ap(struct vop_nremove_args *ap)
1889{
1890 int error;
1891
1892 DO_OPS(ap->a_head.a_ops, error, ap, vop_nremove);
1893 return(error);
1894}
1895
1896int
1897vop_nrmdir_ap(struct vop_nrmdir_args *ap)
1898{
1899 int error;
1900
1901 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrmdir);
1902 return(error);
1903}
1904
1905int
1906vop_nrename_ap(struct vop_nrename_args *ap)
1907{
1908 int error;
1909
1910 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrename);
1911 return(error);
1912}
1913