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