MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2UnlockVcb

Function Ext2UnlockVcb

Ext4Fsd/fsctl.c:205–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205NTSTATUS
206Ext2UnlockVcb ( IN PEXT2_VCB Vcb,
207 IN PFILE_OBJECT FileObject )
208{
209 NTSTATUS Status;
210
211 __try {
212
213 if (FileObject && FileObject->FsContext != Vcb) {
214 Status = STATUS_NOT_LOCKED;
215 __leave;
216 }
217
218 if (!FlagOn(Vcb->Flags, VCB_VOLUME_LOCKED)) {
219 DEBUG(DL_ERR, ( ": Ext2UnlockVcb: Volume is not locked.\n"));
220 Status = STATUS_NOT_LOCKED;
221 __leave;
222 }
223
224 if (Vcb->LockFile == FileObject) {
225 ClearFlag(Vcb->Flags, VCB_VOLUME_LOCKED);
226 Ext2ClearVpbFlag(Vcb->Vpb, VPB_LOCKED);
227 DEBUG(DL_INF, ( "Ext2UnlockVcb: Volume unlocked.\n"));
228 Status = STATUS_SUCCESS;
229 } else {
230 Status = STATUS_NOT_LOCKED;
231 }
232
233 } __finally {
234 // Nothing
235 }
236
237 return Status;
238}
239
240NTSTATUS
241Ext2UnlockVolume (

Callers 2

Ext2UnlockVolumeFunction · 0.85
Ext2PnpCancelRemoveFunction · 0.85

Calls 1

Ext2ClearVpbFlagFunction · 0.85

Tested by

no test coverage detected