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