loop-util: Add loop_device_unrelinquish()

Allows taking ownership of a loop device which makes sure that
loop_device_unrefp() will try to destroy it when it runs.
This commit is contained in:
Daan De Meyer
2022-08-03 20:55:32 +02:00
parent d25697f578
commit 24d59aeed3
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -27,6 +27,7 @@ LoopDevice* loop_device_unref(LoopDevice *d);
DEFINE_TRIVIAL_CLEANUP_FUNC(LoopDevice*, loop_device_unref);
void loop_device_relinquish(LoopDevice *d);
void loop_device_unrelinquish(LoopDevice *d);
int loop_device_refresh_size(LoopDevice *d, uint64_t offset, uint64_t size);