Fix stupid braino in last commit, initialize `vp' before we test vp->v_tag.
Spotted by: dillon
This commit is contained in:
parent
493c240c48
commit
cb5ad9d362
@ -669,6 +669,8 @@ filt_vnattach(struct knote *kn)
|
|||||||
kn->kn_fp->f_type != DTYPE_FIFO)
|
kn->kn_fp->f_type != DTYPE_FIFO)
|
||||||
return (EBADF);
|
return (EBADF);
|
||||||
|
|
||||||
|
vp = (struct vnode *)kn->kn_fp->f_data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX
|
* XXX
|
||||||
* this is a hack simply to cause the filter attach to fail
|
* 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)
|
if ((vp)->v_tag != VT_UFS)
|
||||||
return (EOPNOTSUPP);
|
return (EOPNOTSUPP);
|
||||||
|
|
||||||
vp = (struct vnode *)kn->kn_fp->f_data;
|
|
||||||
|
|
||||||
simple_lock(&vp->v_pollinfo.vpi_lock);
|
simple_lock(&vp->v_pollinfo.vpi_lock);
|
||||||
SLIST_INSERT_HEAD(&vp->v_pollinfo.vpi_selinfo.si_note, kn, kn_selnext);
|
SLIST_INSERT_HEAD(&vp->v_pollinfo.vpi_selinfo.si_note, kn, kn_selnext);
|
||||||
simple_unlock(&vp->v_pollinfo.vpi_lock);
|
simple_unlock(&vp->v_pollinfo.vpi_lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user