HomeFreeBSD

The dqrele() function syncs the dq, then acquires the dqh lock, and then
rS185761Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

The dqrele() function syncs the dq, then acquires the dqh lock, and then
does final drop of the the dq reference to put it onto the free list.
There is a possibility that the dq would be found by another thread
after sync and before the dqh lock is acquired. If that other thread
drops the dq before we have taken the dqh lock, the dirty dq is put on
the free list.

Recheck the DQ_MOD after the dqh lock is relocked. Repeat dqsync() if
the dq is dirty. This ensures that up to date dq is written in the quota
file and fixes assertion in dqget().

Reported and tested by: Frode Nordahl <frode nordahl net>
MFC after: 3 days

Details

Provenance
kibAuthored on
Parents
rS185760: replace rtfree with RTFREE
Branches
Unknown
Tags
Unknown

Event Timeline