Home
last modified time | relevance | path

Searched hist:a9320ff3bdfb8234c6820383f691aea06a8080d3 (Results 1 – 1 of 1) sorted by relevance

/freebsd/sys/fs/unionfs/
H A Dunion_vnops.cdiff a9320ff3bdfb8234c6820383f691aea06a8080d3 Tue Apr 29 04:06:07 CEST 1997 KATO Takenori <kato@FreeBSD.org> Revised fix for locking violation when unionfs calls vput with
UN_KLOCK flag.

When UN_KLOCK is set, VOP_UNLOCK should keep uppervp locked and clear
UN_ULOCK flag. To do this, when UN_KLOCK is set, (1) union_unlock
clears UN_ULOCK and does not clear UN_KLOCK, (2) union_lock() does not
access uppervp and does not clear UN_KLOCK, and (3) callers of
vput/VOP_UNLOCK should clear UN_KLOCK. For example, vput becomes:

SETKLOCK(union_node);
vput(vnode);
CLEARKLOCK(union_node);

where SETKLOCK macro sets UN_KLOCK and CLEARKLOCK macro clears
UN_KLOCK.
diff a9320ff3bdfb8234c6820383f691aea06a8080d3 Tue Apr 29 04:06:07 CEST 1997 KATO Takenori <kato@FreeBSD.org> Revised fix for locking violation when unionfs calls vput with
UN_KLOCK flag.

When UN_KLOCK is set, VOP_UNLOCK should keep uppervp locked and clear
UN_ULOCK flag. To do this, when UN_KLOCK is set, (1) union_unlock
clears UN_ULOCK and does not clear UN_KLOCK, (2) union_lock() does not
access uppervp and does not clear UN_KLOCK, and (3) callers of
vput/VOP_UNLOCK should clear UN_KLOCK. For example, vput becomes:

SETKLOCK(union_node);
vput(vnode);
CLEARKLOCK(union_node);

where SETKLOCK macro sets UN_KLOCK and CLEARKLOCK macro clears
UN_KLOCK.