Lines Matching defs:ctx
131 int falloc_locked(proc_t p, struct fileproc **resultfp, int *resultfd, vfs_context_t ctx, int locked);
141 static int closef_finish(struct fileproc *fp, struct fileglob *fg, proc_t p, vfs_context_t ctx);
1602 vfs_context_t ctx = vfs_context_current();
1632 if (vnode_getattr(vp, &va, ctx) != 0) {
1640 cred = vfs_context_ucred(ctx);
1700 vfs_context_t ctx = vfs_context_current();
1701 if(vnode_authorize(vp, NULLVP, (KAUTH_VNODE_ACCESS | KAUTH_VNODE_WRITE_DATA), ctx) != 0) {
1914 vfs_context_t ctx = vfs_context_current();
1915 if(vnode_authorize(vp, NULLVP, (KAUTH_VNODE_ACCESS | KAUTH_VNODE_WRITE_DATA), ctx) != 0) {
1952 vfs_context_t ctx = vfs_context_current();
1953 if(vnode_authorize(vp, NULLVP, (KAUTH_VNODE_ACCESS | KAUTH_VNODE_WRITE_DATA), ctx) != 0) {
2438 vfs_context_t ctx = vfs_context_current();
2463 error = vn_stat_noauth((vnode_t)data, sbptr, NULL, isstat64, ctx);
2465 error = vn_stat((vnode_t)data, sbptr, &fsec, isstat64, ctx);
3893 * ctx VFS context
3914 falloc(proc_t p, struct fileproc **resultfp, int *resultfd, vfs_context_t ctx)
3919 error = falloc_locked(p, resultfp, resultfd, ctx, 1);
3942 * ctx VFS context
3970 vfs_context_t ctx, int locked)
4030 kauth_cred_ref(ctx->vc_ucred);
4034 fp->f_cred = ctx->vc_ucred;
4498 closef_finish(struct fileproc *fp, struct fileglob *fg, proc_t p, vfs_context_t ctx)
4505 error = fo_close(fg, ctx);
4732 vfs_context_t ctx = vfs_context_current();
4750 error = VNOP_ADVLOCK(vp, (caddr_t)fp->f_fglob, F_UNLCK, &lf, F_FLOCK, ctx);
4768 error = VNOP_ADVLOCK(vp, (caddr_t)fp->f_fglob, F_SETLK, &lf, F_FLOCK, ctx);
4771 error = VNOP_ADVLOCK(vp, (caddr_t)fp->f_fglob, F_SETLK, &lf, F_FLOCK|F_WAIT, ctx);
5214 * ctx VFS context for operation
5220 fo_read(struct fileproc *fp, struct uio *uio, int flags, vfs_context_t ctx)
5222 return ((*fp->f_ops->fo_read)(fp, uio, flags, ctx));
5235 * ctx VFS context for operation
5241 fo_write(struct fileproc *fp, struct uio *uio, int flags, vfs_context_t ctx)
5243 return((*fp->f_ops->fo_write)(fp, uio, flags, ctx));
5258 * ctx VFS context for operation
5270 fo_ioctl(struct fileproc *fp, u_long com, caddr_t data, vfs_context_t ctx)
5274 proc_fdunlock(vfs_context_proc(ctx));
5275 error = (*fp->f_ops->fo_ioctl)(fp, com, data, ctx);
5276 proc_fdlock(vfs_context_proc(ctx));
5290 * ctx VFS context for operation
5296 fo_select(struct fileproc *fp, int which, void *wql, vfs_context_t ctx)
5298 return((*fp->f_ops->fo_select)(fp, which, wql, ctx));
5310 * ctx VFS context for operation
5316 fo_close(struct fileglob *fg, vfs_context_t ctx)
5318 return((*fg->fg_ops->fo_close)(fg, ctx));
5330 * ctx VFS context for operation
5336 fo_kqfilter(struct fileproc *fp, struct knote *kn, vfs_context_t ctx)
5338 return ((*fp->f_ops->fo_kqfilter)(fp, kn, ctx));