Add device_is_locked function.

This commit is contained in:
Ondrej Kozina
2019-02-27 17:48:51 +01:00
committed by Milan Broz
parent 1192fd27c6
commit a4d236eebe
2 changed files with 6 additions and 0 deletions

View File

@@ -890,3 +890,8 @@ void device_write_unlock(struct crypt_device *cd, struct device *device)
device->lh = NULL;
}
bool device_is_locked(struct device *device)
{
return device ? device_locked(device->lh) : 0;
}