Fix stupid braino in last commit, initialize `vp' before we test vp->v_tag.

Spotted by: dillon
This commit is contained in:
jlemon 2000-06-25 18:10:45 +00:00
parent 9ecbd3bd6f
commit 81cca6c2e9

View File

@ -669,6 +669,8 @@ filt_vnattach(struct knote *kn)
kn->kn_fp->f_type != DTYPE_FIFO)
return (EBADF);
vp = (struct vnode *)kn->kn_fp->f_data;
/*
* XXX
* this is a hack simply to cause the filter attach to fail
@ -677,8 +679,6 @@ filt_vnattach(struct knote *kn)
if ((vp)->v_tag != VT_UFS)
return (EOPNOTSUPP);
vp = (struct vnode *)kn->kn_fp->f_data;
simple_lock(&vp->v_pollinfo.vpi_lock);
SLIST_INSERT_HEAD(&vp->v_pollinfo.vpi_selinfo.si_note, kn, kn_selnext);
simple_unlock(&vp->v_pollinfo.vpi_lock);