svn commit: r256015 - stable/9/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Thu Oct 3 06:14:45 UTC 2013
Author: kib
Date: Thu Oct 3 06:14:44 2013
New Revision: 256015
URL: http://svnweb.freebsd.org/changeset/base/256015
Log:
MFC r255880:
Acquire a hold reference on the vnode when a knote is instantiated.
Modified:
stable/9/sys/kern/vfs_subr.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/kern/vfs_subr.c
==============================================================================
--- stable/9/sys/kern/vfs_subr.c Thu Oct 3 01:53:17 2013 (r256014)
+++ stable/9/sys/kern/vfs_subr.c Thu Oct 3 06:14:44 2013 (r256015)
@@ -4525,6 +4525,7 @@ vfs_kqfilter(struct vop_kqfilter_args *a
if (vp->v_pollinfo == NULL)
return (ENOMEM);
knl = &vp->v_pollinfo->vpi_selinfo.si_note;
+ vhold(vp);
knlist_add(knl, kn, 0);
return (0);
@@ -4540,6 +4541,7 @@ filt_vfsdetach(struct knote *kn)
KASSERT(vp->v_pollinfo != NULL, ("Missing v_pollinfo"));
knlist_remove(&vp->v_pollinfo->vpi_selinfo.si_note, kn, 0);
+ vdrop(vp);
}
/*ARGSUSED*/
More information about the svn-src-stable-9
mailing list