mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Make udf_allocv() return an unlocked vnode instead of a locked one
to avoid a "locking against myself" panic when udf_hashins() tries to lock it again. Lock the vnode in udf_hashins() before adding it to the hash bucket.
This commit is contained in:
parent
42de97a50a
commit
bf6ac110e0
1 changed files with 1 additions and 2 deletions
|
|
@ -127,10 +127,10 @@ udf_hashins(struct udf_node *node)
|
|||
|
||||
udfmp = node->udfmp;
|
||||
|
||||
vn_lock(node->i_vnode, LK_EXCLUSIVE | LK_RETRY, curthread);
|
||||
mtx_lock(&udfmp->hash_mtx);
|
||||
TAILQ_INSERT_TAIL(&udfmp->udf_tqh, node, tq);
|
||||
mtx_unlock(&udfmp->hash_mtx);
|
||||
vn_lock(node->i_vnode, LK_EXCLUSIVE | LK_RETRY, curthread);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
@ -161,7 +161,6 @@ udf_allocv(struct mount *mp, struct vnode **vpp, struct thread *td)
|
|||
return (error);
|
||||
}
|
||||
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
*vpp = vp;
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue