summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
178b36c)
count is zero. this avoids deadlocking through getnewvnode/vgone.
SCCS-vsn: sys/miscfs/union/union_vnops.c 8.14
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)union_vnops.c 8.13 (Berkeley) %G%
+ * @(#)union_vnops.c 8.14 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
un = VTOUNION(vp);
if (un->un_uppervp != NULLVP) {
un = VTOUNION(vp);
if (un->un_uppervp != NULLVP) {
- if ((un->un_flags & UN_ULOCK) == 0) {
+ if (((un->un_flags & UN_ULOCK) == 0) &&
+ (vp->v_usecount != 0)) {
un->un_flags |= UN_ULOCK;
VOP_LOCK(un->un_uppervp);
}
un->un_flags |= UN_ULOCK;
VOP_LOCK(un->un_uppervp);
}