MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / clear_lock

Function clear_lock

block/src/fcntl.rs:226–228  ·  view source on GitHub ↗

Clears a lock. # Parameters - `file`: The file to clear all locks for [`LockType`]. - `granularity`: The [`LockGranularity`].

(file: &Fd, granularity: LockGranularity)

Source from the content-addressed store, hash-verified

224/// - `file`: The file to clear all locks for [`LockType`].
225/// - `granularity`: The [`LockGranularity`].
226pub fn clear_lock<Fd: AsRawFd>(file: &Fd, granularity: LockGranularity) -> Result<(), LockError> {
227 try_acquire_lock(file, LockType::Unlock, granularity)
228}
229
230/// Returns the current lock state using [`fcntl`] with respect to the given
231/// parameters.

Callers 1

unlock_imageMethod · 0.85

Calls 1

try_acquire_lockFunction · 0.85

Tested by

no test coverage detected