HomeFreeBSD

In nfs_upgrade_vnlock(), assert that the vnode is locked. It is for all

Description

In nfs_upgrade_vnlock(), assert that the vnode is locked. It is for all
pathes, as far as I see and testing seems to confirm it. Comparision of
old_lock with LK_SHARED make sense only if vnode is locked by current
thread.

When downgrading, pass LK_RETRY to the vn_lock(), since otherwise
vn_lock() unlocks the doomed vnode, causing extra unlock.

Reported and tested by: pho
Approved by: re (rwatson)
MFC after: 3 weeks

Details

Provenance
kibAuthored on Aug 14 2009, 10:59 AM
Parents
rGaabd624cf40d: Add the address of the lock to the KTR_LOCK trace.
Branches
Unknown
Tags
Unknown

Event Timeline