File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2186,6 +2186,8 @@ freevnode(struct vnode *vp)
21862186{
21872187 struct bufobj * bo ;
21882188
2189+ ASSERT_VOP_UNLOCKED (vp , __func__ );
2190+
21892191 /*
21902192 * The vnode has been marked for destruction, so free it.
21912193 *
@@ -2222,12 +2224,16 @@ freevnode(struct vnode *vp)
22222224 mac_vnode_destroy (vp );
22232225#endif
22242226 if (vp -> v_pollinfo != NULL ) {
2227+ int error __diagused ;
2228+
22252229 /*
22262230 * Use LK_NOWAIT to shut up witness about the lock. We may get
22272231 * here while having another vnode locked when trying to
22282232 * satisfy a lookup and needing to recycle.
22292233 */
2230- VOP_LOCK (vp , LK_EXCLUSIVE | LK_NOWAIT );
2234+ error = VOP_LOCK (vp , LK_EXCLUSIVE | LK_NOWAIT );
2235+ VNASSERT (error == 0 , vp ,
2236+ ("freevnode: cannot lock vp %p for pollinfo destroy" , vp ));
22312237 destroy_vpollinfo (vp -> v_pollinfo );
22322238 VOP_UNLOCK (vp );
22332239 vp -> v_pollinfo = NULL ;
You can’t perform that action at this time.
0 commit comments