Page MenuHomeFreeBSD

D32986.id98486.diff
No OneTemporary

D32986.id98486.diff

Index: sys/fs/unionfs/union_vnops.c
===================================================================
--- sys/fs/unionfs/union_vnops.c
+++ sys/fs/unionfs/union_vnops.c
@@ -1434,7 +1434,18 @@
ump = MOUNTTOUNIONFSMOUNT(ap->a_vp->v_mount);
if (ump->um_whitemode == UNIONFS_WHITE_ALWAYS || lvp != NULLVP)
cnp->cn_flags |= DOWHITEOUT;
+ /*
+ * The relookup path will need to relock the parent dvp and
+ * possibly the vp as well. Locking is expected to be done
+ * in parent->child order; drop the lock on vp to avoid LOR
+ * and potential recursion on vp's lock.
+ * vp is expected to remain referenced during VOP_RMDIR(),
+ * so vref/vrele should not be necessary here.
+ */
+ VOP_UNLOCK(ap->a_vp);
+ VNPASS(vrefcnt(ap->a_vp) > 0, ap->a_vp);
error = unionfs_relookup_for_delete(ap->a_dvp, cnp, td);
+ vn_lock(ap->a_vp, LK_EXCLUSIVE | LK_RETRY);
if (error == 0)
error = VOP_RMDIR(udvp, uvp, cnp);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 1:08 PM (18 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15541635
Default Alt Text
D32986.id98486.diff (938 B)

Event Timeline