HomeFreeBSD

Do not upgrade the vnode lock to call getinoquota().

Description

Do not upgrade the vnode lock to call getinoquota().

Doing so can deadlock when the thread already owns another vnode lock,
e.g. during a rename, as was demonstrated by the reporter. In fact,
there seems to be no need to force the call to getinoquota() always,
because vn_open() locks vnode exclusively, and this is the most
important case. To add to the point, directories where the dirent is
added or removed, are locked exclusively as well.

Reported by: bwidawsk
Tested by: bwidawsk, pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week

Details

Provenance
kibAuthored on
Parents
rS338732: Move rpc and netconfig to lib/libc/rpc/
Branches
Unknown
Tags
Unknown