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