Skip to content

passthrough: Fix InodeData reference counting

Sebastian Hasler requested to merge haslersn/virtiofsd:fix-25 into main

Previously, the InodeData reference counting could increment the refcount from 0 to 1. See #25 (closed). We fix this by using a CAS loop.

Closes: #25 (closed)

Also, in forget_one(), we change the ordering of decrementing the refcount to Ordering::Relaxed, because the refcount itself doesn't protect any data. Furthermore, the old ordering Ordering::Release doesn't make any sense because there's no side-effect that could potentially get reordered to after the decrement.

Merge request reports