if ((error = VOP_GETATTR(ap->a_vp, &va, ap->a_cred, ap->a_p)) != 0)
if ((ap->a_mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) { switch (vp->v_type) { case VREG: case VDIR: case VLNK: return (EROFS); default: break; } }  error = VOP_GETATTR(vp, &va, ap->a_cred, ap->a_p); if (error)
nfsspec_access(v)	void *v;{	struct vop_access_args /* {		struct vnode *a_vp;		int  a_mode;		struct ucred *a_cred;		struct proc *a_p;	} */ *ap = v;	struct vattr va;	int error;	if ((error = VOP_GETATTR(ap->a_vp, &va, ap->a_cred, ap->a_p)) != 0)		return (error);	return (vaccess(va.va_mode, va.va_uid, va.va_gid, ap->a_mode,	    ap->a_cred));}