Fix a bug introduced which causes chkgrp to coredump on certain group file
[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 *
2281065e 35 * $DragonFly: src/sys/kern/vfs_vopops.c,v 1.13 2004/12/29 02:40:02 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);
216VNODEOP_DESC_INIT_DVP_VPP_CNP(lookup);
2d3e977e
MD
217VNODEOP_DESC_INIT_DVP_VPP_CNP(create);
218VNODEOP_DESC_INIT_DVP_CNP(whiteout);
219VNODEOP_DESC_INIT_DVP_VPP_CNP(mknod);
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);
227VNODEOP_DESC_INIT_VP_CRED(lease);
228VNODEOP_DESC_INIT_VP_CRED(ioctl);
229VNODEOP_DESC_INIT_VP_CRED(poll);
230VNODEOP_DESC_INIT_VP(kqfilter);
231VNODEOP_DESC_INIT_VP(revoke);
232VNODEOP_DESC_INIT_VP_CRED(mmap);
233VNODEOP_DESC_INIT_VP(fsync);
234VNODEOP_DESC_INIT_DVP_VP_CNP(remove);
235VNODEOP_DESC_INIT_TDVP_VP_CNP(link);
236
237static int VOFFNAME(rename)[] = {
238 __offsetof(VARGSSTRUCT(rename), a_fdvp),
239 __offsetof(VARGSSTRUCT(rename), a_fvp),
240 __offsetof(VARGSSTRUCT(rename), a_tdvp),
241 __offsetof(VARGSSTRUCT(rename), a_tvp),
242 VDESC_NO_OFFSET
243};
244VNODEOP_DESC_INIT(rename,
245 VDESC_VP0_WILLRELE|VDESC_VP1_WILLRELE|
3446c007
MD
246 VDESC_VP2_WILLRELE|VDESC_VP3_WILLRELE|
247 VDESC_VP2_WILLUNLOCK|VDESC_VP3_WILLUNLOCK, /* tdvp and tvp */
2d3e977e
MD
248 VOFFNAME(rename),
249 VDESC_NO_OFFSET,
250 VDESC_NO_OFFSET,
251 VDESC_NO_OFFSET,
252 __offsetof(VARGSSTRUCT(rename), a_fcnp));
fad57d0e 253
2d3e977e
MD
254VNODEOP_DESC_INIT_DVP_VPP_CNP(mkdir);
255VNODEOP_DESC_INIT_DVP_VP_CNP(rmdir);
256VNODEOP_DESC_INIT_DVP_VPP_CNP(symlink);
257VNODEOP_DESC_INIT_VP_CRED(readdir);
258VNODEOP_DESC_INIT_VP_CRED(readlink);
259VNODEOP_DESC_INIT_VP(inactive);
260VNODEOP_DESC_INIT_VP(reclaim);
261VNODEOP_DESC_INIT_VP(lock);
262VNODEOP_DESC_INIT_VP(unlock);
263VNODEOP_DESC_INIT_VP_VPP(bmap);
264VNODEOP_DESC_INIT_VP(strategy);
265VNODEOP_DESC_INIT_VP(print);
266VNODEOP_DESC_INIT_VP(pathconf);
267VNODEOP_DESC_INIT_VP(advlock);
268VNODEOP_DESC_INIT_VP_CRED(balloc);
269VNODEOP_DESC_INIT_VP(reallocblks);
270VNODEOP_DESC_INIT_VP(getpages);
271VNODEOP_DESC_INIT_VP(putpages);
272VNODEOP_DESC_INIT_VP(freeblks);
273VNODEOP_DESC_INIT_VP(bwrite);
274VNODEOP_DESC_INIT_VP_CRED(getacl);
275VNODEOP_DESC_INIT_VP_CRED(setacl);
276VNODEOP_DESC_INIT_VP_CRED(aclcheck);
277VNODEOP_DESC_INIT_VP_CRED(getextattr);
278VNODEOP_DESC_INIT_VP_CRED(setextattr);
279VNODEOP_DESC_INIT_VP(createvobject);
280VNODEOP_DESC_INIT_VP(destroyvobject);
281VNODEOP_DESC_INIT_VP(getvobject);
949ecb9b 282VNODEOP_DESC_INIT_SIMPLE(mountctl);
cbe54d63 283
fad57d0e
MD
284VNODEOP_DESC_INIT_NCP_CRED(nresolve);
285VNODEOP_DESC_INIT_DVP_VPP_CRED(nlookupdotdot);
286VNODEOP_DESC_INIT_NCP_CRED_VPP(ncreate);
287VNODEOP_DESC_INIT_NCP_CRED_VPP(nmkdir);
288VNODEOP_DESC_INIT_NCP_CRED_VPP(nmknod);
289VNODEOP_DESC_INIT_NCP_VP_CRED(nlink);
290VNODEOP_DESC_INIT_NCP_CRED_VPP(nsymlink);
291VNODEOP_DESC_INIT_NCP_CRED(nwhiteout);
292VNODEOP_DESC_INIT_NCP_CRED(nremove);
293VNODEOP_DESC_INIT_NCP_CRED(nrmdir);
294VNODEOP_DESC_INIT_NCP2_CRED(nrename);
295
6ddb7618
MD
296#define DO_OPS(ops, error, ap, vop_field) \
297 error = ops->vop_field(ap);
2d3e977e 298
0961aa92
MD
299/************************************************************************
300 * PRIMARY HIGH LEVEL VNODE OPERATIONS CALLS *
301 ************************************************************************
302 *
303 * These procedures are called directly from the kernel and/or fileops
304 * code to perform file/device operations on the system.
305 */
306
2d3e977e 307int
0961aa92 308vop_islocked(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
309{
310 struct vop_islocked_args ap;
cbe54d63 311 int error;
2d3e977e
MD
312
313 ap.a_head.a_desc = &vop_islocked_desc;
0961aa92 314 ap.a_head.a_ops = ops;
2d3e977e
MD
315 ap.a_vp = vp;
316 ap.a_td = td;
cbe54d63
MD
317
318 DO_OPS(ops, error, &ap, vop_islocked);
319 return(error);
2d3e977e
MD
320}
321
322int
0961aa92 323vop_lookup(struct vop_ops *ops, struct vnode *dvp,
26b67a34 324 struct vnode **vpp, struct componentname *cnp)
2d3e977e
MD
325{
326 struct vop_lookup_args ap;
cbe54d63 327 int error;
2d3e977e
MD
328
329 ap.a_head.a_desc = &vop_lookup_desc;
0961aa92 330 ap.a_head.a_ops = ops;
2d3e977e 331 ap.a_dvp = dvp;
2d3e977e 332 ap.a_vpp = vpp;
2d3e977e 333 ap.a_cnp = cnp;
cbe54d63
MD
334
335 DO_OPS(ops, error, &ap, vop_lookup);
336 return(error);
2d3e977e
MD
337}
338
339int
fad57d0e 340vop_create(struct vop_ops *ops, struct vnode *dvp,
0961aa92 341 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e
MD
342{
343 struct vop_create_args ap;
cbe54d63 344 int error;
2d3e977e
MD
345
346 ap.a_head.a_desc = &vop_create_desc;
0961aa92 347 ap.a_head.a_ops = ops;
2d3e977e 348 ap.a_dvp = dvp;
2d3e977e
MD
349 ap.a_vpp = vpp;
350 ap.a_cnp = cnp;
351 ap.a_vap = vap;
cbe54d63
MD
352
353 DO_OPS(ops, error, &ap, vop_create);
354 return(error);
2d3e977e
MD
355}
356
357int
fad57d0e 358vop_whiteout(struct vop_ops *ops, struct vnode *dvp,
0961aa92 359 struct componentname *cnp, int flags)
2d3e977e
MD
360{
361 struct vop_whiteout_args ap;
cbe54d63 362 int error;
2d3e977e
MD
363
364 ap.a_head.a_desc = &vop_whiteout_desc;
0961aa92 365 ap.a_head.a_ops = ops;
2d3e977e 366 ap.a_dvp = dvp;
2d3e977e
MD
367 ap.a_cnp = cnp;
368 ap.a_flags = flags;
cbe54d63
MD
369
370 DO_OPS(ops, error, &ap, vop_whiteout);
371 return(error);
2d3e977e
MD
372}
373
374int
fad57d0e 375vop_mknod(struct vop_ops *ops, struct vnode *dvp,
0961aa92 376 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e
MD
377{
378 struct vop_mknod_args ap;
cbe54d63 379 int error;
2d3e977e
MD
380
381 ap.a_head.a_desc = &vop_mknod_desc;
0961aa92 382 ap.a_head.a_ops = ops;
2d3e977e 383 ap.a_dvp = dvp;
2d3e977e
MD
384 ap.a_vpp = vpp;
385 ap.a_cnp = cnp;
386 ap.a_vap = vap;
cbe54d63
MD
387
388 DO_OPS(ops, error, &ap, vop_mknod);
389 return(error);
2d3e977e
MD
390}
391
392int
0961aa92 393vop_open(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
fad57d0e 394 struct file *fp, struct thread *td)
2d3e977e
MD
395{
396 struct vop_open_args ap;
cbe54d63 397 int error;
2d3e977e
MD
398
399 ap.a_head.a_desc = &vop_open_desc;
0961aa92 400 ap.a_head.a_ops = ops;
2d3e977e 401 ap.a_vp = vp;
fad57d0e 402 ap.a_fp = fp;
2d3e977e
MD
403 ap.a_mode = mode;
404 ap.a_cred = cred;
405 ap.a_td = td;
cbe54d63
MD
406
407 DO_OPS(ops, error, &ap, vop_open);
408 return(error);
2d3e977e
MD
409}
410
411int
0961aa92 412vop_close(struct vop_ops *ops, struct vnode *vp, int fflag, struct thread *td)
2d3e977e
MD
413{
414 struct vop_close_args ap;
cbe54d63 415 int error;
2d3e977e
MD
416
417 ap.a_head.a_desc = &vop_close_desc;
0961aa92 418 ap.a_head.a_ops = ops;
2d3e977e
MD
419 ap.a_vp = vp;
420 ap.a_fflag = fflag;
421 ap.a_td = td;
cbe54d63
MD
422
423 DO_OPS(ops, error, &ap, vop_close);
424 return(error);
2d3e977e
MD
425}
426
427int
0961aa92
MD
428vop_access(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
429 struct thread *td)
2d3e977e
MD
430{
431 struct vop_access_args ap;
cbe54d63 432 int error;
2d3e977e
MD
433
434 ap.a_head.a_desc = &vop_access_desc;
0961aa92 435 ap.a_head.a_ops = ops;
2d3e977e
MD
436 ap.a_vp = vp;
437 ap.a_mode = mode;
438 ap.a_cred = cred;
439 ap.a_td = td;
cbe54d63
MD
440
441 DO_OPS(ops, error, &ap, vop_access);
442 return(error);
2d3e977e
MD
443}
444
445int
0961aa92
MD
446vop_getattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
447 struct thread *td)
2d3e977e
MD
448{
449 struct vop_getattr_args ap;
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);
459 return(error);
2d3e977e
MD
460}
461
462int
0961aa92
MD
463vop_setattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap,
464 struct ucred *cred, struct thread *td)
2d3e977e
MD
465{
466 struct vop_setattr_args ap;
cbe54d63 467 int error;
2d3e977e
MD
468
469 ap.a_head.a_desc = &vop_setattr_desc;
0961aa92 470 ap.a_head.a_ops = ops;
2d3e977e
MD
471 ap.a_vp = vp;
472 ap.a_vap = vap;
473 ap.a_cred = cred;
474 ap.a_td = td;
cbe54d63
MD
475
476 DO_OPS(ops, error, &ap, vop_setattr);
477 return(error);
2d3e977e
MD
478}
479
480int
0961aa92
MD
481vop_read(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
482 struct ucred *cred)
2d3e977e
MD
483{
484 struct vop_read_args ap;
cbe54d63 485 int error;
2d3e977e
MD
486
487 ap.a_head.a_desc = &vop_read_desc;
0961aa92 488 ap.a_head.a_ops = ops;
2d3e977e
MD
489 ap.a_vp = vp;
490 ap.a_uio = uio;
491 ap.a_ioflag = ioflag;
492 ap.a_cred = cred;
cbe54d63
MD
493
494 DO_OPS(ops, error, &ap, vop_read);
495 return(error);
2d3e977e
MD
496}
497
498int
0961aa92
MD
499vop_write(struct vop_ops *ops, struct vnode *vp, struct uio *uio, int ioflag,
500 struct ucred *cred)
2d3e977e
MD
501{
502 struct vop_write_args ap;
cbe54d63 503 int error;
2d3e977e
MD
504
505 ap.a_head.a_desc = &vop_write_desc;
0961aa92 506 ap.a_head.a_ops = ops;
2d3e977e
MD
507 ap.a_vp = vp;
508 ap.a_uio = uio;
509 ap.a_ioflag = ioflag;
510 ap.a_cred = cred;
cbe54d63
MD
511
512 DO_OPS(ops, error, &ap, vop_write);
513 return(error);
2d3e977e
MD
514}
515
516int
0961aa92
MD
517vop_lease(struct vop_ops *ops, struct vnode *vp, struct thread *td,
518 struct ucred *cred, int flag)
2d3e977e
MD
519{
520 struct vop_lease_args ap;
cbe54d63 521 int error;
2d3e977e
MD
522
523 ap.a_head.a_desc = &vop_lease_desc;
0961aa92 524 ap.a_head.a_ops = ops;
2d3e977e
MD
525 ap.a_vp = vp;
526 ap.a_td = td;
527 ap.a_cred = cred;
528 ap.a_flag = flag;
cbe54d63
MD
529
530 DO_OPS(ops, error, &ap, vop_lease);
531 return(error);
2d3e977e
MD
532}
533
534int
0961aa92
MD
535vop_ioctl(struct vop_ops *ops, struct vnode *vp, u_long command, caddr_t data,
536 int fflag, struct ucred *cred,
537 struct thread *td)
2d3e977e
MD
538{
539 struct vop_ioctl_args ap;
cbe54d63 540 int error;
2d3e977e
MD
541
542 ap.a_head.a_desc = &vop_ioctl_desc;
0961aa92 543 ap.a_head.a_ops = ops;
2d3e977e
MD
544 ap.a_vp = vp;
545 ap.a_command = command;
546 ap.a_data = data;
547 ap.a_fflag = fflag;
548 ap.a_cred = cred;
549 ap.a_td = td;
cbe54d63
MD
550
551 DO_OPS(ops, error, &ap, vop_ioctl);
552 return(error);
2d3e977e
MD
553}
554
555int
0961aa92
MD
556vop_poll(struct vop_ops *ops, struct vnode *vp, int events, struct ucred *cred,
557 struct thread *td)
2d3e977e
MD
558{
559 struct vop_poll_args ap;
cbe54d63 560 int error;
2d3e977e
MD
561
562 ap.a_head.a_desc = &vop_poll_desc;
0961aa92 563 ap.a_head.a_ops = ops;
2d3e977e
MD
564 ap.a_vp = vp;
565 ap.a_events = events;
566 ap.a_cred = cred;
567 ap.a_td = td;
cbe54d63
MD
568
569 DO_OPS(ops, error, &ap, vop_poll);
570 return(error);
2d3e977e
MD
571}
572
573int
0961aa92 574vop_kqfilter(struct vop_ops *ops, struct vnode *vp, struct knote *kn)
2d3e977e
MD
575{
576 struct vop_kqfilter_args ap;
cbe54d63 577 int error;
2d3e977e
MD
578
579 ap.a_head.a_desc = &vop_kqfilter_desc;
0961aa92 580 ap.a_head.a_ops = ops;
2d3e977e
MD
581 ap.a_vp = vp;
582 ap.a_kn = kn;
cbe54d63
MD
583
584 DO_OPS(ops, error, &ap, vop_kqfilter);
585 return(error);
2d3e977e
MD
586}
587
588int
0961aa92 589vop_revoke(struct vop_ops *ops, struct vnode *vp, int flags)
2d3e977e
MD
590{
591 struct vop_revoke_args ap;
cbe54d63 592 int error;
2d3e977e
MD
593
594 ap.a_head.a_desc = &vop_revoke_desc;
0961aa92 595 ap.a_head.a_ops = ops;
2d3e977e
MD
596 ap.a_vp = vp;
597 ap.a_flags = flags;
cbe54d63
MD
598
599 DO_OPS(ops, error, &ap, vop_revoke);
600 return(error);
2d3e977e
MD
601}
602
603int
0961aa92
MD
604vop_mmap(struct vop_ops *ops, struct vnode *vp, int fflags, struct ucred *cred,
605 struct thread *td)
2d3e977e
MD
606{
607 struct vop_mmap_args ap;
cbe54d63 608 int error;
2d3e977e
MD
609
610 ap.a_head.a_desc = &vop_mmap_desc;
0961aa92 611 ap.a_head.a_ops = ops;
2d3e977e
MD
612 ap.a_vp = vp;
613 ap.a_fflags = fflags;
614 ap.a_cred = cred;
615 ap.a_td = td;
cbe54d63
MD
616
617 DO_OPS(ops, error, &ap, vop_mmap);
618 return(error);
2d3e977e
MD
619}
620
621int
0961aa92 622vop_fsync(struct vop_ops *ops, struct vnode *vp, int waitfor, struct thread *td)
2d3e977e
MD
623{
624 struct vop_fsync_args ap;
cbe54d63 625 int error;
2d3e977e
MD
626
627 ap.a_head.a_desc = &vop_fsync_desc;
0961aa92 628 ap.a_head.a_ops = ops;
2d3e977e
MD
629 ap.a_vp = vp;
630 ap.a_waitfor = waitfor;
631 ap.a_td = td;
cbe54d63
MD
632
633 DO_OPS(ops, error, &ap, vop_fsync);
634 return(error);
2d3e977e
MD
635}
636
637int
fad57d0e 638vop_remove(struct vop_ops *ops, struct vnode *dvp,
0961aa92 639 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
640{
641 struct vop_remove_args ap;
cbe54d63 642 int error;
2d3e977e
MD
643
644 ap.a_head.a_desc = &vop_remove_desc;
0961aa92 645 ap.a_head.a_ops = ops;
2d3e977e 646 ap.a_dvp = dvp;
2d3e977e
MD
647 ap.a_vp = vp;
648 ap.a_cnp = cnp;
cbe54d63
MD
649
650 DO_OPS(ops, error, &ap, vop_remove);
651 return(error);
2d3e977e
MD
652}
653
21739618 654int
fad57d0e 655vop_link(struct vop_ops *ops, struct vnode *tdvp,
0961aa92 656 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
657{
658 struct vop_link_args ap;
cbe54d63 659 int error;
2d3e977e
MD
660
661 ap.a_head.a_desc = &vop_link_desc;
0961aa92 662 ap.a_head.a_ops = ops;
2d3e977e 663 ap.a_tdvp = tdvp;
2d3e977e
MD
664 ap.a_vp = vp;
665 ap.a_cnp = cnp;
cbe54d63
MD
666
667 DO_OPS(ops, error, &ap, vop_link);
668 return(error);
2d3e977e
MD
669}
670
671int
fad57d0e
MD
672vop_rename(struct vop_ops *ops,
673 struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp,
674 struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp)
2d3e977e
MD
675{
676 struct vop_rename_args ap;
cbe54d63 677 int error;
2d3e977e
MD
678
679 ap.a_head.a_desc = &vop_rename_desc;
0961aa92 680 ap.a_head.a_ops = ops;
2d3e977e 681 ap.a_fdvp = fdvp;
2d3e977e
MD
682 ap.a_fvp = fvp;
683 ap.a_fcnp = fcnp;
684 ap.a_tdvp = tdvp;
2d3e977e
MD
685 ap.a_tvp = tvp;
686 ap.a_tcnp = tcnp;
cbe54d63
MD
687
688 DO_OPS(ops, error, &ap, vop_rename);
689 return(error);
2d3e977e
MD
690}
691
692int
fad57d0e 693vop_mkdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 694 struct vnode **vpp, struct componentname *cnp, struct vattr *vap)
2d3e977e
MD
695{
696 struct vop_mkdir_args ap;
cbe54d63 697 int error;
2d3e977e
MD
698
699 ap.a_head.a_desc = &vop_mkdir_desc;
0961aa92 700 ap.a_head.a_ops = ops;
2d3e977e 701 ap.a_dvp = dvp;
2d3e977e
MD
702 ap.a_vpp = vpp;
703 ap.a_cnp = cnp;
704 ap.a_vap = vap;
cbe54d63
MD
705
706 DO_OPS(ops, error, &ap, vop_mkdir);
707 return(error);
2d3e977e
MD
708}
709
710int
fad57d0e 711vop_rmdir(struct vop_ops *ops, struct vnode *dvp,
0961aa92 712 struct vnode *vp, struct componentname *cnp)
2d3e977e
MD
713{
714 struct vop_rmdir_args ap;
cbe54d63 715 int error;
2d3e977e
MD
716
717 ap.a_head.a_desc = &vop_rmdir_desc;
0961aa92 718 ap.a_head.a_ops = ops;
2d3e977e 719 ap.a_dvp = dvp;
2d3e977e
MD
720 ap.a_vp = vp;
721 ap.a_cnp = cnp;
cbe54d63
MD
722
723 DO_OPS(ops, error, &ap, vop_rmdir);
724 return(error);
2d3e977e
MD
725}
726
727int
fad57d0e 728vop_symlink(struct vop_ops *ops, struct vnode *dvp,
0961aa92
MD
729 struct vnode **vpp, struct componentname *cnp,
730 struct vattr *vap, char *target)
2d3e977e
MD
731{
732 struct vop_symlink_args ap;
cbe54d63 733 int error;
2d3e977e
MD
734
735 ap.a_head.a_desc = &vop_symlink_desc;
0961aa92 736 ap.a_head.a_ops = ops;
2d3e977e 737 ap.a_dvp = dvp;
2d3e977e
MD
738 ap.a_vpp = vpp;
739 ap.a_cnp = cnp;
740 ap.a_vap = vap;
741 ap.a_target = target;
cbe54d63
MD
742
743 DO_OPS(ops, error, &ap, vop_symlink);
744 return(error);
2d3e977e
MD
745}
746
747int
0961aa92
MD
748vop_readdir(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
749 struct ucred *cred, int *eofflag, int *ncookies, u_long **cookies)
2d3e977e
MD
750{
751 struct vop_readdir_args ap;
cbe54d63 752 int error;
2d3e977e
MD
753
754 ap.a_head.a_desc = &vop_readdir_desc;
0961aa92 755 ap.a_head.a_ops = ops;
2d3e977e
MD
756 ap.a_vp = vp;
757 ap.a_uio = uio;
758 ap.a_cred = cred;
759 ap.a_eofflag = eofflag;
760 ap.a_ncookies = ncookies;
761 ap.a_cookies = cookies;
cbe54d63
MD
762
763 DO_OPS(ops, error, &ap, vop_readdir);
764 return(error);
2d3e977e
MD
765}
766
767int
0961aa92
MD
768vop_readlink(struct vop_ops *ops, struct vnode *vp, struct uio *uio,
769 struct ucred *cred)
2d3e977e
MD
770{
771 struct vop_readlink_args ap;
cbe54d63 772 int error;
2d3e977e
MD
773
774 ap.a_head.a_desc = &vop_readlink_desc;
0961aa92 775 ap.a_head.a_ops = ops;
2d3e977e
MD
776 ap.a_vp = vp;
777 ap.a_uio = uio;
778 ap.a_cred = cred;
cbe54d63
MD
779
780 DO_OPS(ops, error, &ap, vop_readlink);
781 return(error);
2d3e977e
MD
782}
783
784int
0961aa92 785vop_inactive(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
786{
787 struct vop_inactive_args ap;
cbe54d63 788 int error;
2d3e977e
MD
789
790 ap.a_head.a_desc = &vop_inactive_desc;
0961aa92 791 ap.a_head.a_ops = ops;
2d3e977e
MD
792 ap.a_vp = vp;
793 ap.a_td = td;
cbe54d63
MD
794
795 DO_OPS(ops, error, &ap, vop_inactive);
796 return(error);
2d3e977e
MD
797}
798
799int
0961aa92 800vop_reclaim(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
801{
802 struct vop_reclaim_args ap;
cbe54d63 803 int error;
2d3e977e
MD
804
805 ap.a_head.a_desc = &vop_reclaim_desc;
0961aa92 806 ap.a_head.a_ops = ops;
2d3e977e
MD
807 ap.a_vp = vp;
808 ap.a_td = td;
cbe54d63
MD
809
810 DO_OPS(ops, error, &ap, vop_reclaim);
811 return(error);
2d3e977e
MD
812}
813
814int
5fd012e0 815vop_lock(struct vop_ops *ops, struct vnode *vp, int flags, struct thread *td)
2d3e977e
MD
816{
817 struct vop_lock_args ap;
cbe54d63 818 int error;
2d3e977e
MD
819
820 ap.a_head.a_desc = &vop_lock_desc;
0961aa92 821 ap.a_head.a_ops = ops;
2d3e977e 822 ap.a_vp = vp;
2d3e977e
MD
823 ap.a_flags = flags;
824 ap.a_td = td;
cbe54d63
MD
825
826 DO_OPS(ops, error, &ap, vop_lock);
827 return(error);
2d3e977e
MD
828}
829
830int
5fd012e0 831vop_unlock(struct vop_ops *ops, struct vnode *vp, int flags, struct thread *td)
2d3e977e
MD
832{
833 struct vop_unlock_args ap;
cbe54d63 834 int error;
2d3e977e
MD
835
836 ap.a_head.a_desc = &vop_unlock_desc;
0961aa92 837 ap.a_head.a_ops = ops;
2d3e977e 838 ap.a_vp = vp;
2d3e977e
MD
839 ap.a_flags = flags;
840 ap.a_td = td;
cbe54d63
MD
841
842 DO_OPS(ops, error, &ap, vop_unlock);
843 return(error);
2d3e977e
MD
844}
845
846int
0961aa92
MD
847vop_bmap(struct vop_ops *ops, struct vnode *vp, daddr_t bn, struct vnode **vpp,
848 daddr_t *bnp, int *runp, int *runb)
2d3e977e
MD
849{
850 struct vop_bmap_args ap;
cbe54d63 851 int error;
2d3e977e
MD
852
853 ap.a_head.a_desc = &vop_bmap_desc;
0961aa92 854 ap.a_head.a_ops = ops;
2d3e977e
MD
855 ap.a_vp = vp;
856 ap.a_bn = bn;
857 ap.a_vpp = vpp;
858 ap.a_bnp = bnp;
859 ap.a_runp = runp;
860 ap.a_runb = runb;
cbe54d63
MD
861
862 DO_OPS(ops, error, &ap, vop_bmap);
863 return(error);
2d3e977e
MD
864}
865
866int
0961aa92 867vop_strategy(struct vop_ops *ops, struct vnode *vp, struct buf *bp)
2d3e977e
MD
868{
869 struct vop_strategy_args ap;
cbe54d63 870 int error;
2d3e977e
MD
871
872 ap.a_head.a_desc = &vop_strategy_desc;
0961aa92 873 ap.a_head.a_ops = ops;
2d3e977e
MD
874 ap.a_vp = vp;
875 ap.a_bp = bp;
cbe54d63
MD
876
877 DO_OPS(ops, error, &ap, vop_strategy);
878 return(error);
2d3e977e
MD
879}
880
881int
0961aa92 882vop_print(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
883{
884 struct vop_print_args ap;
cbe54d63 885 int error;
2d3e977e
MD
886
887 ap.a_head.a_desc = &vop_print_desc;
0961aa92 888 ap.a_head.a_ops = ops;
2d3e977e 889 ap.a_vp = vp;
cbe54d63
MD
890
891 DO_OPS(ops, error, &ap, vop_print);
892 return(error);
2d3e977e
MD
893}
894
895int
0961aa92
MD
896vop_pathconf(struct vop_ops *ops, struct vnode *vp, int name,
897 register_t *retval)
2d3e977e
MD
898{
899 struct vop_pathconf_args ap;
cbe54d63 900 int error;
2d3e977e
MD
901
902 ap.a_head.a_desc = &vop_pathconf_desc;
0961aa92 903 ap.a_head.a_ops = ops;
2d3e977e
MD
904 ap.a_vp = vp;
905 ap.a_name = name;
906 ap.a_retval = retval;
cbe54d63
MD
907
908 DO_OPS(ops, error, &ap, vop_pathconf);
909 return(error);
2d3e977e
MD
910}
911
912int
0961aa92
MD
913vop_advlock(struct vop_ops *ops, struct vnode *vp, caddr_t id, int op,
914 struct flock *fl, int flags)
2d3e977e
MD
915{
916 struct vop_advlock_args ap;
cbe54d63 917 int error;
2d3e977e
MD
918
919 ap.a_head.a_desc = &vop_advlock_desc;
0961aa92 920 ap.a_head.a_ops = ops;
2d3e977e
MD
921 ap.a_vp = vp;
922 ap.a_id = id;
923 ap.a_op = op;
924 ap.a_fl = fl;
925 ap.a_flags = flags;
cbe54d63
MD
926
927 DO_OPS(ops, error, &ap, vop_advlock);
928 return(error);
2d3e977e
MD
929}
930
931int
0961aa92
MD
932vop_balloc(struct vop_ops *ops, struct vnode *vp, off_t startoffset,
933 int size, struct ucred *cred, int flags,
934 struct buf **bpp)
2d3e977e
MD
935{
936 struct vop_balloc_args ap;
cbe54d63 937 int error;
2d3e977e
MD
938
939 ap.a_head.a_desc = &vop_balloc_desc;
0961aa92 940 ap.a_head.a_ops = ops;
2d3e977e
MD
941 ap.a_vp = vp;
942 ap.a_startoffset = startoffset;
943 ap.a_size = size;
944 ap.a_cred = cred;
945 ap.a_flags = flags;
946 ap.a_bpp = bpp;
cbe54d63
MD
947
948 DO_OPS(ops, error, &ap, vop_balloc);
949 return(error);
2d3e977e
MD
950}
951
952int
0961aa92
MD
953vop_reallocblks(struct vop_ops *ops, struct vnode *vp,
954 struct cluster_save *buflist)
2d3e977e
MD
955{
956 struct vop_reallocblks_args ap;
cbe54d63 957 int error;
2d3e977e
MD
958
959 ap.a_head.a_desc = &vop_reallocblks_desc;
0961aa92 960 ap.a_head.a_ops = ops;
2d3e977e
MD
961 ap.a_vp = vp;
962 ap.a_buflist = buflist;
cbe54d63
MD
963
964 DO_OPS(ops, error, &ap, vop_reallocblks);
965 return(error);
2d3e977e
MD
966}
967
968int
0961aa92
MD
969vop_getpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
970 int reqpage, vm_ooffset_t offset)
2d3e977e
MD
971{
972 struct vop_getpages_args ap;
cbe54d63 973 int error;
2d3e977e
MD
974
975 ap.a_head.a_desc = &vop_getpages_desc;
0961aa92 976 ap.a_head.a_ops = ops;
2d3e977e
MD
977 ap.a_vp = vp;
978 ap.a_m = m;
979 ap.a_count = count;
980 ap.a_reqpage = reqpage;
981 ap.a_offset = offset;
cbe54d63
MD
982
983 DO_OPS(ops, error, &ap, vop_getpages);
984 return(error);
2d3e977e
MD
985}
986
987int
0961aa92
MD
988vop_putpages(struct vop_ops *ops, struct vnode *vp, vm_page_t *m, int count,
989 int sync, int *rtvals, vm_ooffset_t offset)
2d3e977e
MD
990{
991 struct vop_putpages_args ap;
cbe54d63 992 int error;
2d3e977e
MD
993
994 ap.a_head.a_desc = &vop_putpages_desc;
0961aa92 995 ap.a_head.a_ops = ops;
2d3e977e
MD
996 ap.a_vp = vp;
997 ap.a_m = m;
998 ap.a_count = count;
999 ap.a_sync = sync;
1000 ap.a_rtvals = rtvals;
1001 ap.a_offset = offset;
cbe54d63
MD
1002
1003 DO_OPS(ops, error, &ap, vop_putpages);
1004 return(error);
2d3e977e
MD
1005}
1006
1007int
0961aa92
MD
1008vop_freeblks(struct vop_ops *ops, struct vnode *vp,
1009 daddr_t addr, daddr_t length)
2d3e977e
MD
1010{
1011 struct vop_freeblks_args ap;
cbe54d63 1012 int error;
2d3e977e
MD
1013
1014 ap.a_head.a_desc = &vop_freeblks_desc;
0961aa92 1015 ap.a_head.a_ops = ops;
2d3e977e
MD
1016 ap.a_vp = vp;
1017 ap.a_addr = addr;
1018 ap.a_length = length;
cbe54d63
MD
1019
1020 DO_OPS(ops, error, &ap, vop_freeblks);
1021 return(error);
2d3e977e
MD
1022}
1023
1024int
0961aa92 1025vop_bwrite(struct vop_ops *ops, struct vnode *vp, struct buf *bp)
2d3e977e
MD
1026{
1027 struct vop_bwrite_args ap;
cbe54d63 1028 int error;
2d3e977e
MD
1029
1030 ap.a_head.a_desc = &vop_bwrite_desc;
0961aa92 1031 ap.a_head.a_ops = ops;
2d3e977e
MD
1032 ap.a_vp = vp;
1033 ap.a_bp = bp;
cbe54d63
MD
1034
1035 DO_OPS(ops, error, &ap, vop_bwrite);
1036 return(error);
2d3e977e
MD
1037}
1038
1039int
0961aa92
MD
1040vop_getacl(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_getacl_args ap;
cbe54d63 1044 int error;
2d3e977e
MD
1045
1046 ap.a_head.a_desc = &vop_getacl_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_getacl);
1055 return(error);
2d3e977e
MD
1056}
1057
1058int
0961aa92
MD
1059vop_setacl(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1060 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1061{
1062 struct vop_setacl_args ap;
cbe54d63 1063 int error;
2d3e977e
MD
1064
1065 ap.a_head.a_desc = &vop_setacl_desc;
0961aa92 1066 ap.a_head.a_ops = ops;
2d3e977e
MD
1067 ap.a_vp = vp;
1068 ap.a_type = type;
1069 ap.a_aclp = aclp;
1070 ap.a_cred = cred;
1071 ap.a_td = td;
cbe54d63
MD
1072
1073 DO_OPS(ops, error, &ap, vop_setacl);
1074 return(error);
2d3e977e
MD
1075}
1076
1077int
0961aa92
MD
1078vop_aclcheck(struct vop_ops *ops, struct vnode *vp, acl_type_t type,
1079 struct acl *aclp, struct ucred *cred, struct thread *td)
2d3e977e
MD
1080{
1081 struct vop_aclcheck_args ap;
cbe54d63 1082 int error;
2d3e977e
MD
1083
1084 ap.a_head.a_desc = &vop_aclcheck_desc;
0961aa92 1085 ap.a_head.a_ops = ops;
2d3e977e
MD
1086 ap.a_vp = vp;
1087 ap.a_type = type;
1088 ap.a_aclp = aclp;
1089 ap.a_cred = cred;
1090 ap.a_td = td;
cbe54d63
MD
1091
1092 DO_OPS(ops, error, &ap, vop_aclcheck);
1093 return(error);
2d3e977e
MD
1094}
1095
1096int
0961aa92
MD
1097vop_getextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1098 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1099{
1100 struct vop_getextattr_args ap;
cbe54d63 1101 int error;
2d3e977e
MD
1102
1103 ap.a_head.a_desc = &vop_getextattr_desc;
0961aa92 1104 ap.a_head.a_ops = ops;
2d3e977e
MD
1105 ap.a_vp = vp;
1106 ap.a_name = name;
1107 ap.a_uio = uio;
1108 ap.a_cred = cred;
1109 ap.a_td = td;
cbe54d63
MD
1110
1111 DO_OPS(ops, error, &ap, vop_getextattr);
1112 return(error);
2d3e977e
MD
1113}
1114
1115int
0961aa92
MD
1116vop_setextattr(struct vop_ops *ops, struct vnode *vp, char *name,
1117 struct uio *uio, struct ucred *cred, struct thread *td)
2d3e977e
MD
1118{
1119 struct vop_setextattr_args ap;
cbe54d63 1120 int error;
2d3e977e
MD
1121
1122 ap.a_head.a_desc = &vop_setextattr_desc;
0961aa92 1123 ap.a_head.a_ops = ops;
2d3e977e
MD
1124 ap.a_vp = vp;
1125 ap.a_name = name;
1126 ap.a_uio = uio;
1127 ap.a_cred = cred;
1128 ap.a_td = td;
cbe54d63
MD
1129
1130 DO_OPS(ops, error, &ap, vop_setextattr);
1131 return(error);
2d3e977e
MD
1132}
1133
1134int
0961aa92 1135vop_createvobject(struct vop_ops *ops, struct vnode *vp, struct thread *td)
2d3e977e
MD
1136{
1137 struct vop_createvobject_args ap;
cbe54d63 1138 int error;
2d3e977e
MD
1139
1140 ap.a_head.a_desc = &vop_createvobject_desc;
0961aa92 1141 ap.a_head.a_ops = ops;
2d3e977e
MD
1142 ap.a_vp = vp;
1143 ap.a_td = td;
cbe54d63
MD
1144
1145 DO_OPS(ops, error, &ap, vop_createvobject);
1146 return(error);
2d3e977e
MD
1147}
1148
1149int
0961aa92 1150vop_destroyvobject(struct vop_ops *ops, struct vnode *vp)
2d3e977e
MD
1151{
1152 struct vop_destroyvobject_args ap;
cbe54d63 1153 int error;
2d3e977e
MD
1154
1155 ap.a_head.a_desc = &vop_destroyvobject_desc;
0961aa92 1156 ap.a_head.a_ops = ops;
2d3e977e 1157 ap.a_vp = vp;
cbe54d63
MD
1158
1159 DO_OPS(ops, error, &ap, vop_destroyvobject);
1160 return(error);
2d3e977e
MD
1161}
1162
1163int
0961aa92 1164vop_getvobject(struct vop_ops *ops, struct vnode *vp, struct vm_object **objpp)
2d3e977e
MD
1165{
1166 struct vop_getvobject_args ap;
cbe54d63 1167 int error;
2d3e977e
MD
1168
1169 ap.a_head.a_desc = &vop_getvobject_desc;
0961aa92 1170 ap.a_head.a_ops = ops;
2d3e977e
MD
1171 ap.a_vp = vp;
1172 ap.a_objpp = objpp;
cbe54d63
MD
1173
1174 DO_OPS(ops, error, &ap, vop_getvobject);
1175 return(error);
1176}
1177
1178int
2281065e
MD
1179vop_mountctl(struct vop_ops *ops, int op, struct file *fp,
1180 const void *ctl, int ctllen, void *buf, int buflen, int *res)
cbe54d63 1181{
949ecb9b 1182 struct vop_mountctl_args ap;
cbe54d63
MD
1183 int error;
1184
949ecb9b 1185 ap.a_head.a_desc = &vop_mountctl_desc;
cbe54d63
MD
1186 ap.a_head.a_ops = ops;
1187 ap.a_op = op;
949ecb9b 1188 ap.a_ctl = ctl;
2281065e 1189 ap.a_fp = fp;
949ecb9b
MD
1190 ap.a_ctllen = ctllen;
1191 ap.a_buf = buf;
1192 ap.a_buflen = buflen;
1193 ap.a_res = res;
cbe54d63 1194
949ecb9b 1195 DO_OPS(ops, error, &ap, vop_mountctl);
cbe54d63 1196 return(error);
0961aa92
MD
1197}
1198
fad57d0e
MD
1199/*
1200 * NEW API FUNCTIONS
1201 *
1202 * nresolve takes a locked ncp and a cred and resolves the ncp into a
1203 * positive or negative hit.
1204 *
1205 * The namecache is automatically adjusted by this function. The ncp
1206 * is left locked on return.
1207 */
1208int
1209vop_nresolve(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1210{
1211 struct vop_nresolve_args ap;
1212 int error;
1213
1214 ap.a_head.a_desc = &vop_nresolve_desc;
1215 ap.a_head.a_ops = ops;
1216 ap.a_ncp = ncp;
1217 ap.a_cred = cred;
1218
1219 DO_OPS(ops, error, &ap, vop_nresolve);
1220 return(error);
1221}
1222
1223/*
1224 * nlookupdotdot takes an unlocked directory, dvp, and looks up "..", returning
1225 * a locked parent directory in *vpp. If an error occurs *vpp will be NULL.
1226 */
1227int
1228vop_nlookupdotdot(struct vop_ops *ops, struct vnode *dvp,
1229 struct vnode **vpp, struct ucred *cred)
1230{
1231 struct vop_nlookupdotdot_args ap;
1232 int error;
1233
1234 ap.a_head.a_desc = &vop_nlookupdotdot_desc;
1235 ap.a_head.a_ops = ops;
1236 ap.a_dvp = dvp;
1237 ap.a_vpp = vpp;
1238 ap.a_cred = cred;
1239
1240 DO_OPS(ops, error, &ap, vop_nlookupdotdot);
1241 return(error);
1242}
1243
1244/*
1245 * ncreate takes a locked, resolved ncp that typically represents a negative
1246 * cache hit and creates the file or node specified by the ncp, cred, and
1247 * vattr. If no error occurs a locked vnode is returned in *vpp.
1248 *
1249 * The namecache is automatically adjusted by this function. The ncp
1250 * is left locked on return.
1251 */
1252int
1253vop_ncreate(struct vop_ops *ops, struct namecache *ncp,
1254 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1255{
1256 struct vop_ncreate_args ap;
1257 int error;
1258
1259 ap.a_head.a_desc = &vop_ncreate_desc;
1260 ap.a_head.a_ops = ops;
1261 ap.a_ncp = ncp;
1262 ap.a_vpp = vpp;
1263 ap.a_cred = cred;
1264 ap.a_vap = vap;
1265
1266 DO_OPS(ops, error, &ap, vop_ncreate);
1267 return(error);
1268}
1269
1270/*
1271 * nmkdir takes a locked, resolved ncp that typically represents a negative
1272 * cache hit and creates the directory specified by the ncp, cred, and
1273 * vattr. If no error occurs a locked vnode is returned in *vpp.
1274 *
1275 * The namecache is automatically adjusted by this function. The ncp
1276 * is left locked on return.
1277 */
1278int
1279vop_nmkdir(struct vop_ops *ops, struct namecache *ncp,
1280 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1281{
1282 struct vop_nmkdir_args ap;
1283 int error;
1284
1285 ap.a_head.a_desc = &vop_nmkdir_desc;
1286 ap.a_head.a_ops = ops;
1287 ap.a_ncp = ncp;
1288 ap.a_vpp = vpp;
1289 ap.a_cred = cred;
1290 ap.a_vap = vap;
1291
1292 DO_OPS(ops, error, &ap, vop_nmkdir);
1293 return(error);
1294}
1295
1296/*
1297 * nmknod takes a locked, resolved ncp that typically represents a negative
1298 * cache hit and creates the node specified by the ncp, cred, and
1299 * vattr. If no error occurs a locked vnode is returned in *vpp.
1300 *
1301 * The namecache is automatically adjusted by this function. The ncp
1302 * is left locked on return.
1303 */
1304int
1305vop_nmknod(struct vop_ops *ops, struct namecache *ncp,
1306 struct vnode **vpp, struct ucred *cred, struct vattr *vap)
1307{
1308 struct vop_nmknod_args ap;
1309 int error;
1310
1311 ap.a_head.a_desc = &vop_nmknod_desc;
1312 ap.a_head.a_ops = ops;
1313 ap.a_ncp = ncp;
1314 ap.a_vpp = vpp;
1315 ap.a_cred = cred;
1316 ap.a_vap = vap;
1317
1318 DO_OPS(ops, error, &ap, vop_nmknod);
1319 return(error);
1320}
1321
1322/*
1323 * nlink takes a locked, resolved ncp that typically represents a negative
1324 * cache hit and creates the node specified by the ncp, cred, and
1325 * existing vnode. The passed vp must be locked and will remain locked
1326 * on return, as does the ncp, whether an error occurs or not.
1327 *
1328 * The namecache is automatically adjusted by this function. The ncp
1329 * is left locked on return.
1330 */
1331int
1332vop_nlink(struct vop_ops *ops, struct namecache *ncp,
1333 struct vnode *vp, struct ucred *cred)
1334{
1335 struct vop_nlink_args ap;
1336 int error;
1337
1338 ap.a_head.a_desc = &vop_nlink_desc;
1339 ap.a_head.a_ops = ops;
1340 ap.a_ncp = ncp;
1341 ap.a_vp = vp;
1342 ap.a_cred = cred;
1343
1344 DO_OPS(ops, error, &ap, vop_nlink);
1345 return(error);
1346}
1347
1348/*
1349 * nsymlink takes a locked, resolved ncp that typically represents a negative
1350 * cache hit and creates a symbolic link based on cred, vap, and target (the
1351 * contents of the link). If no error occurs a locked vnode is returned in
1352 * *vpp.
1353 *
1354 * The namecache is automatically adjusted by this function. The ncp
1355 * is left locked on return.
1356 */
1357int
1358vop_nsymlink(struct vop_ops *ops, struct namecache *ncp,
1359 struct vnode **vpp, struct ucred *cred,
1360 struct vattr *vap, char *target)
1361{
1362 struct vop_nsymlink_args ap;
1363 int error;
1364
1365 ap.a_head.a_desc = &vop_nsymlink_desc;
1366 ap.a_head.a_ops = ops;
1367 ap.a_ncp = ncp;
1368 ap.a_vpp = vpp;
1369 ap.a_cred = cred;
1370 ap.a_vap = vap;
1371 ap.a_target = target;
1372
1373 DO_OPS(ops, error, &ap, vop_nsymlink);
1374 return(error);
1375}
1376
1377/*
1378 * nwhiteout takes a locked, resolved ncp that can represent a positive or
1379 * negative hit and executes the whiteout function specified in flags.
1380 *
1381 * The namecache is automatically adjusted by this function. The ncp
1382 * is left locked on return.
1383 */
1384int
1385vop_nwhiteout(struct vop_ops *ops, struct namecache *ncp,
1386 struct ucred *cred, int flags)
1387{
1388 struct vop_nwhiteout_args ap;
1389 int error;
1390
1391 ap.a_head.a_desc = &vop_nwhiteout_desc;
1392 ap.a_head.a_ops = ops;
1393 ap.a_ncp = ncp;
1394 ap.a_cred = cred;
1395 ap.a_flags = flags;
1396
1397 DO_OPS(ops, error, &ap, vop_nwhiteout);
1398 return(error);
1399}
1400
1401/*
1402 * nremove takes a locked, resolved ncp that generally represents a
1403 * positive hit and removes the file.
1404 *
1405 * The namecache is automatically adjusted by this function. The ncp
1406 * is left locked on return.
1407 */
1408int
1409vop_nremove(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1410{
1411 struct vop_nremove_args ap;
1412 int error;
1413
1414 ap.a_head.a_desc = &vop_nremove_desc;
1415 ap.a_head.a_ops = ops;
1416 ap.a_ncp = ncp;
1417 ap.a_cred = cred;
1418
1419 DO_OPS(ops, error, &ap, vop_nremove);
1420 return(error);
1421}
1422
1423/*
1424 * nrmdir takes a locked, resolved ncp that generally represents a
1425 * directory and removes the directory.
1426 *
1427 * The namecache is automatically adjusted by this function. The ncp
1428 * is left locked on return.
1429 */
1430int
1431vop_nrmdir(struct vop_ops *ops, struct namecache *ncp, struct ucred *cred)
1432{
1433 struct vop_nrmdir_args ap;
1434 int error;
1435
1436 ap.a_head.a_desc = &vop_nrmdir_desc;
1437 ap.a_head.a_ops = ops;
1438 ap.a_ncp = ncp;
1439 ap.a_cred = cred;
1440
1441 DO_OPS(ops, error, &ap, vop_nrmdir);
1442 return(error);
1443}
1444
1445/*
1446 * nrename takes TWO locked, resolved ncp's and the cred of the caller
1447 * and renames the source ncp to the target ncp. The target ncp may
1448 * represent a positive or negative hit.
1449 *
1450 * The namecache is automatically adjusted by this function. The ncp
1451 * is left locked on return. The source ncp is typically changed to
1452 * a negative cache hit and the target ncp typically takes on the
1453 * source ncp's underlying file.
1454 */
1455int
1456vop_nrename(struct vop_ops *ops, struct namecache *fncp,
1457 struct namecache *tncp, struct ucred *cred)
1458{
1459 struct vop_nrename_args ap;
1460 int error;
1461
1462 ap.a_head.a_desc = &vop_nrename_desc;
1463 ap.a_head.a_ops = ops;
1464 ap.a_fncp = fncp;
1465 ap.a_tncp = tncp;
1466 ap.a_cred = cred;
1467
1468 DO_OPS(ops, error, &ap, vop_nrename);
1469 return(error);
1470}
1471
0961aa92
MD
1472/************************************************************************
1473 * PRIMARY VNODE OPERATIONS FORWARDING CALLS *
1474 ************************************************************************
1475 *
1476 * These procedures are called from VFSs such as unionfs and nullfs
1477 * when they wish to forward an operation on one VFS to another. The
1478 * argument structure/message is modified and then directly passed to the
1479 * appropriate routine. This routines may also be called by initiators
1480 * who have an argument structure in hand rather then discreet arguments.
1481 */
1482int
1483vop_vnoperate_ap(struct vop_generic_args *ap)
1484{
cbe54d63
MD
1485 struct vop_ops *ops;
1486 int error;
1487
1488 ops = ap->a_ops;
6ddb7618
MD
1489 error = VOCALL(ops, ap);
1490
1491 return (error);
1492}
1493
1494/*
1495 * This routine is called by the cache coherency layer to execute the actual
1496 * VFS operation. If a journaling layer is present we call though it, else
1497 * we call the native VOP functions.
1498 */
1499int
1500vop_cache_operate_ap(struct vop_generic_args *ap)
1501{
1502 struct vop_ops *ops;
1503 int error;
1504
1505 ops = ap->a_ops;
1506 if (ops->vv_mount->mnt_vn_journal_ops)
1507 error = VOCALL(ops->vv_mount->mnt_vn_journal_ops, ap);
1508 else
1509 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1510 return (error);
1511}
1512
1513
1514/*
1515 * This routine is called by the journaling layer to execute the actual
1516 * VFS operation.
1517 */
1518int
1519vop_journal_operate_ap(struct vop_generic_args *ap)
1520{
1521 struct vop_ops *ops;
1522 int error;
1523
1524 ops = ap->a_ops;
1525 error = VOCALL(ops->vv_mount->mnt_vn_norm_ops, ap);
1526
cbe54d63 1527 return (error);
0961aa92
MD
1528}
1529
1530int
1531vop_islocked_ap(struct vop_islocked_args *ap)
1532{
cbe54d63
MD
1533 int error;
1534
1535 DO_OPS(ap->a_head.a_ops, error, ap, vop_islocked);
1536 return(error);
0961aa92
MD
1537}
1538
1539int
1540vop_lookup_ap(struct vop_lookup_args *ap)
1541{
cbe54d63
MD
1542 int error;
1543
1544 DO_OPS(ap->a_head.a_ops, error, ap, vop_lookup);
1545 return(error);
0961aa92
MD
1546}
1547
0961aa92
MD
1548int
1549vop_create_ap(struct vop_create_args *ap)
1550{
cbe54d63
MD
1551 int error;
1552
1553 DO_OPS(ap->a_head.a_ops, error, ap, vop_create);
1554 return(error);
0961aa92
MD
1555}
1556
1557int
1558vop_whiteout_ap(struct vop_whiteout_args *ap)
1559{
cbe54d63
MD
1560 int error;
1561
1562 DO_OPS(ap->a_head.a_ops, error, ap, vop_whiteout);
1563 return(error);
0961aa92
MD
1564}
1565
1566int
1567vop_mknod_ap(struct vop_mknod_args *ap)
1568{
cbe54d63
MD
1569 int error;
1570
1571 DO_OPS(ap->a_head.a_ops, error, ap, vop_mknod);
1572 return(error);
0961aa92
MD
1573}
1574
1575int
1576vop_open_ap(struct vop_open_args *ap)
1577{
cbe54d63
MD
1578 int error;
1579
1580 DO_OPS(ap->a_head.a_ops, error, ap, vop_open);
1581 return(error);
0961aa92
MD
1582}
1583
1584int
1585vop_close_ap(struct vop_close_args *ap)
1586{
cbe54d63
MD
1587 int error;
1588
1589 DO_OPS(ap->a_head.a_ops, error, ap, vop_close);
1590 return(error);
0961aa92
MD
1591}
1592
1593int
1594vop_access_ap(struct vop_access_args *ap)
1595{
cbe54d63
MD
1596 int error;
1597
1598 DO_OPS(ap->a_head.a_ops, error, ap, vop_access);
1599 return(error);
0961aa92
MD
1600}
1601
1602int
1603vop_getattr_ap(struct vop_getattr_args *ap)
1604{
cbe54d63
MD
1605 int error;
1606
1607 DO_OPS(ap->a_head.a_ops, error, ap, vop_getattr);
1608 return(error);
0961aa92
MD
1609}
1610
1611int
1612vop_setattr_ap(struct vop_setattr_args *ap)
1613{
cbe54d63
MD
1614 int error;
1615
1616 DO_OPS(ap->a_head.a_ops, error, ap, vop_setattr);
1617 return(error);
0961aa92
MD
1618}
1619
1620int
1621vop_read_ap(struct vop_read_args *ap)
1622{
cbe54d63
MD
1623 int error;
1624
1625 DO_OPS(ap->a_head.a_ops, error, ap, vop_read);
1626 return(error);
0961aa92
MD
1627}
1628
1629int
1630vop_write_ap(struct vop_write_args *ap)
1631{
cbe54d63
MD
1632 int error;
1633
1634 DO_OPS(ap->a_head.a_ops, error, ap, vop_write);
1635 return(error);
0961aa92
MD
1636}
1637
1638int
1639vop_lease_ap(struct vop_lease_args *ap)
1640{
cbe54d63
MD
1641 int error;
1642
1643 DO_OPS(ap->a_head.a_ops, error, ap, vop_lease);
1644 return(error);
0961aa92
MD
1645}
1646
1647int
1648vop_ioctl_ap(struct vop_ioctl_args *ap)
1649{
cbe54d63
MD
1650 int error;
1651
1652 DO_OPS(ap->a_head.a_ops, error, ap, vop_ioctl);
1653 return(error);
0961aa92
MD
1654}
1655
1656int
1657vop_poll_ap(struct vop_poll_args *ap)
1658{
cbe54d63
MD
1659 int error;
1660
1661 DO_OPS(ap->a_head.a_ops, error, ap, vop_poll);
1662 return(error);
0961aa92
MD
1663}
1664
1665int
1666vop_kqfilter_ap(struct vop_kqfilter_args *ap)
1667{
cbe54d63
MD
1668 int error;
1669
1670 DO_OPS(ap->a_head.a_ops, error, ap, vop_kqfilter);
1671 return(error);
0961aa92
MD
1672}
1673
1674int
1675vop_revoke_ap(struct vop_revoke_args *ap)
1676{
cbe54d63
MD
1677 int error;
1678
1679 DO_OPS(ap->a_head.a_ops, error, ap, vop_revoke);
1680 return(error);
0961aa92
MD
1681}
1682
1683int
1684vop_mmap_ap(struct vop_mmap_args *ap)
1685{
cbe54d63
MD
1686 int error;
1687
1688 DO_OPS(ap->a_head.a_ops, error, ap, vop_mmap);
1689 return(error);
0961aa92
MD
1690}
1691
1692int
1693vop_fsync_ap(struct vop_fsync_args *ap)
1694{
cbe54d63
MD
1695 int error;
1696
1697 DO_OPS(ap->a_head.a_ops, error, ap, vop_fsync);
1698 return(error);
0961aa92
MD
1699}
1700
1701int
1702vop_remove_ap(struct vop_remove_args *ap)
1703{
cbe54d63
MD
1704 int error;
1705
1706 DO_OPS(ap->a_head.a_ops, error, ap, vop_remove);
1707 return(error);
0961aa92
MD
1708}
1709
1710int
1711vop_link_ap(struct vop_link_args *ap)
1712{
cbe54d63
MD
1713 int error;
1714
1715 DO_OPS(ap->a_head.a_ops, error, ap, vop_link);
1716 return(error);
0961aa92
MD
1717}
1718
1719int
1720vop_rename_ap(struct vop_rename_args *ap)
1721{
cbe54d63
MD
1722 int error;
1723
1724 DO_OPS(ap->a_head.a_ops, error, ap, vop_rename);
1725 return(error);
0961aa92
MD
1726}
1727
1728int
1729vop_mkdir_ap(struct vop_mkdir_args *ap)
1730{
cbe54d63
MD
1731 int error;
1732
1733 DO_OPS(ap->a_head.a_ops, error, ap, vop_mkdir);
1734 return(error);
0961aa92
MD
1735}
1736
1737int
1738vop_rmdir_ap(struct vop_rmdir_args *ap)
1739{
cbe54d63
MD
1740 int error;
1741
1742 DO_OPS(ap->a_head.a_ops, error, ap, vop_rmdir);
1743 return(error);
0961aa92
MD
1744}
1745
1746int
1747vop_symlink_ap(struct vop_symlink_args *ap)
1748{
cbe54d63
MD
1749 int error;
1750
1751 DO_OPS(ap->a_head.a_ops, error, ap, vop_symlink);
1752 return(error);
0961aa92
MD
1753}
1754
1755int
1756vop_readdir_ap(struct vop_readdir_args *ap)
1757{
cbe54d63
MD
1758 int error;
1759
1760 DO_OPS(ap->a_head.a_ops, error, ap, vop_readdir);
1761 return(error);
0961aa92
MD
1762}
1763
1764int
1765vop_readlink_ap(struct vop_readlink_args *ap)
1766{
cbe54d63
MD
1767 int error;
1768
1769 DO_OPS(ap->a_head.a_ops, error, ap, vop_readlink);
1770 return(error);
0961aa92
MD
1771}
1772
1773int
1774vop_inactive_ap(struct vop_inactive_args *ap)
1775{
cbe54d63
MD
1776 int error;
1777
1778 DO_OPS(ap->a_head.a_ops, error, ap, vop_inactive);
1779 return(error);
0961aa92
MD
1780}
1781
1782int
1783vop_reclaim_ap(struct vop_reclaim_args *ap)
1784{
cbe54d63
MD
1785 int error;
1786
1787 DO_OPS(ap->a_head.a_ops, error, ap, vop_reclaim);
1788 return(error);
0961aa92
MD
1789}
1790
1791int
1792vop_lock_ap(struct vop_lock_args *ap)
1793{
cbe54d63
MD
1794 int error;
1795
1796 DO_OPS(ap->a_head.a_ops, error, ap, vop_lock);
1797 return(error);
0961aa92
MD
1798}
1799
1800int
1801vop_unlock_ap(struct vop_unlock_args *ap)
1802{
cbe54d63
MD
1803 int error;
1804
1805 DO_OPS(ap->a_head.a_ops, error, ap, vop_unlock);
1806 return(error);
0961aa92
MD
1807}
1808
1809int
1810vop_bmap_ap(struct vop_bmap_args *ap)
1811{
cbe54d63
MD
1812 int error;
1813
1814 DO_OPS(ap->a_head.a_ops, error, ap, vop_bmap);
1815 return(error);
0961aa92
MD
1816}
1817
1818int
1819vop_strategy_ap(struct vop_strategy_args *ap)
1820{
cbe54d63
MD
1821 int error;
1822
1823 DO_OPS(ap->a_head.a_ops, error, ap, vop_strategy);
1824 return(error);
0961aa92
MD
1825}
1826
1827int
1828vop_print_ap(struct vop_print_args *ap)
1829{
cbe54d63
MD
1830 int error;
1831
1832 DO_OPS(ap->a_head.a_ops, error, ap, vop_print);
1833 return(error);
0961aa92
MD
1834}
1835
1836int
1837vop_pathconf_ap(struct vop_pathconf_args *ap)
1838{
cbe54d63
MD
1839 int error;
1840
1841 DO_OPS(ap->a_head.a_ops, error, ap, vop_pathconf);
1842 return(error);
0961aa92
MD
1843}
1844
1845int
1846vop_advlock_ap(struct vop_advlock_args *ap)
1847{
cbe54d63
MD
1848 int error;
1849
1850 DO_OPS(ap->a_head.a_ops, error, ap, vop_advlock);
1851 return(error);
0961aa92
MD
1852}
1853
1854int
1855vop_balloc_ap(struct vop_balloc_args *ap)
1856{
cbe54d63
MD
1857 int error;
1858
1859 DO_OPS(ap->a_head.a_ops, error, ap, vop_balloc);
1860 return(error);
0961aa92
MD
1861}
1862
1863int
1864vop_reallocblks_ap(struct vop_reallocblks_args *ap)
1865{
cbe54d63
MD
1866 int error;
1867
1868 DO_OPS(ap->a_head.a_ops, error, ap, vop_reallocblks);
1869 return(error);
0961aa92
MD
1870}
1871
1872int
1873vop_getpages_ap(struct vop_getpages_args *ap)
1874{
cbe54d63
MD
1875 int error;
1876
1877 DO_OPS(ap->a_head.a_ops, error, ap, vop_getpages);
1878 return(error);
0961aa92
MD
1879}
1880
1881int
1882vop_putpages_ap(struct vop_putpages_args *ap)
1883{
cbe54d63
MD
1884 int error;
1885
1886 DO_OPS(ap->a_head.a_ops, error, ap, vop_putpages);
1887 return(error);
0961aa92
MD
1888}
1889
1890int
1891vop_freeblks_ap(struct vop_freeblks_args *ap)
1892{
cbe54d63
MD
1893 int error;
1894
1895 DO_OPS(ap->a_head.a_ops, error, ap, vop_freeblks);
1896 return(error);
0961aa92
MD
1897}
1898
1899int
1900vop_bwrite_ap(struct vop_bwrite_args *ap)
1901{
cbe54d63
MD
1902 int error;
1903
1904 DO_OPS(ap->a_head.a_ops, error, ap, vop_bwrite);
1905 return(error);
0961aa92
MD
1906}
1907
1908int
1909vop_getacl_ap(struct vop_getacl_args *ap)
1910{
cbe54d63
MD
1911 int error;
1912
1913 DO_OPS(ap->a_head.a_ops, error, ap, vop_getacl);
1914 return(error);
0961aa92
MD
1915}
1916
1917int
1918vop_setacl_ap(struct vop_setacl_args *ap)
1919{
cbe54d63
MD
1920 int error;
1921
1922 DO_OPS(ap->a_head.a_ops, error, ap, vop_setacl);
1923 return(error);
0961aa92
MD
1924}
1925
1926int
1927vop_aclcheck_ap(struct vop_aclcheck_args *ap)
1928{
cbe54d63
MD
1929 int error;
1930
1931 DO_OPS(ap->a_head.a_ops, error, ap, vop_aclcheck);
1932 return(error);
0961aa92
MD
1933}
1934
1935int
1936vop_getextattr_ap(struct vop_getextattr_args *ap)
1937{
cbe54d63
MD
1938 int error;
1939
1940 DO_OPS(ap->a_head.a_ops, error, ap, vop_getextattr);
1941 return(error);
0961aa92
MD
1942}
1943
1944int
1945vop_setextattr_ap(struct vop_setextattr_args *ap)
1946{
cbe54d63
MD
1947 int error;
1948
1949 DO_OPS(ap->a_head.a_ops, error, ap, vop_setextattr);
1950 return(error);
0961aa92
MD
1951}
1952
1953int
1954vop_createvobject_ap(struct vop_createvobject_args *ap)
1955{
cbe54d63
MD
1956 int error;
1957
1958 DO_OPS(ap->a_head.a_ops, error, ap, vop_createvobject);
1959 return(error);
0961aa92
MD
1960}
1961
1962int
1963vop_destroyvobject_ap(struct vop_destroyvobject_args *ap)
1964{
cbe54d63
MD
1965 int error;
1966
1967 DO_OPS(ap->a_head.a_ops, error, ap, vop_destroyvobject);
1968 return(error);
0961aa92
MD
1969}
1970
1971int
1972vop_getvobject_ap(struct vop_getvobject_args *ap)
1973{
cbe54d63
MD
1974 int error;
1975
1976 DO_OPS(ap->a_head.a_ops, error, ap, vop_getvobject);
1977 return(error);
1978}
1979
1980int
949ecb9b 1981vop_mountctl_ap(struct vop_mountctl_args *ap)
cbe54d63
MD
1982{
1983 int error;
1984
949ecb9b 1985 DO_OPS(ap->a_head.a_ops, error, ap, vop_mountctl);
cbe54d63 1986 return(error);
2d3e977e
MD
1987}
1988
fad57d0e
MD
1989int
1990vop_nresolve_ap(struct vop_nresolve_args *ap)
1991{
1992 int error;
1993
1994 DO_OPS(ap->a_head.a_ops, error, ap, vop_nresolve);
1995 return(error);
1996}
1997
1998int
1999vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap)
2000{
2001 int error;
2002
2003 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlookupdotdot);
2004 return(error);
2005}
2006
2007int
2008vop_ncreate_ap(struct vop_ncreate_args *ap)
2009{
2010 int error;
2011
2012 DO_OPS(ap->a_head.a_ops, error, ap, vop_ncreate);
2013 return(error);
2014}
2015
2016int
2017vop_nmkdir_ap(struct vop_nmkdir_args *ap)
2018{
2019 int error;
2020
2021 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmkdir);
2022 return(error);
2023}
2024
2025int
2026vop_nmknod_ap(struct vop_nmknod_args *ap)
2027{
2028 int error;
2029
2030 DO_OPS(ap->a_head.a_ops, error, ap, vop_nmknod);
2031 return(error);
2032}
2033
2034int
2035vop_nlink_ap(struct vop_nlink_args *ap)
2036{
2037 int error;
2038
2039 DO_OPS(ap->a_head.a_ops, error, ap, vop_nlink);
2040 return(error);
2041}
2042
2043int
2044vop_nsymlink_ap(struct vop_nsymlink_args *ap)
2045{
2046 int error;
2047
2048 DO_OPS(ap->a_head.a_ops, error, ap, vop_nsymlink);
2049 return(error);
2050}
2051
2052int
2053vop_nwhiteout_ap(struct vop_nwhiteout_args *ap)
2054{
2055 int error;
2056
2057 DO_OPS(ap->a_head.a_ops, error, ap, vop_nwhiteout);
2058 return(error);
2059}
2060
2061int
2062vop_nremove_ap(struct vop_nremove_args *ap)
2063{
2064 int error;
2065
2066 DO_OPS(ap->a_head.a_ops, error, ap, vop_nremove);
2067 return(error);
2068}
2069
2070int
2071vop_nrmdir_ap(struct vop_nrmdir_args *ap)
2072{
2073 int error;
2074
2075 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrmdir);
2076 return(error);
2077}
2078
2079int
2080vop_nrename_ap(struct vop_nrename_args *ap)
2081{
2082 int error;
2083
2084 DO_OPS(ap->a_head.a_ops, error, ap, vop_nrename);
2085 return(error);
2086}
2087