vn_writechk
if ((accmode & VWRITE) == 0 || (error = vn_writechk(vp)) == 0)
int vn_writechk(struct vnode *vp);