[Virtio-fs] [virtiofsd] MR opened: passthrough: Fix InodeData reference counting

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Mon Jan 31 08:52:36 UTC 2022


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

Closes: #25

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.
---
https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/82




More information about the Virtio-fs mailing list