Skip to content
Snippets Groups Projects
Commit 4045b642 authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Michael S. Tsirkin
Browse files

virtio_fs: introduce virtio_fs_put_locked helper


Introduce a new helper function virtio_fs_put_locked to encapsulate the
common pattern of releasing a virtio_fs reference while holding a lock.
The existing virtio_fs_put helper will be used to release a virtio_fs
reference while not holding a lock.

Also add an assertion in case the lock is not taken when it should.

Reviewed-by: default avatarIdan Zach <izach@nvidia.com>
Reviewed-by: default avatarShai Malin <smalin@nvidia.com>
Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Message-Id: <20240825130716.9506-1-mgurtovoy@nvidia.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent 561a1636
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment