X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdrivers%2Ffilesystems%2Ffastfat%2Ffsctl.c;h=e27f8e868af6333916e173e690a92ecacbcf4b33;hp=ab9d3afae2f17e3de2adebfd0af3c352b8641a71;hb=0ca2bff44e1f9c84dd218a07e21628da464cfd82;hpb=86e82138e791333605e390bf4cedd36d1d79ca15 diff --git a/reactos/drivers/filesystems/fastfat/fsctl.c b/reactos/drivers/filesystems/fastfat/fsctl.c index ab9d3afae2f..e27f8e868af 100644 --- a/reactos/drivers/filesystems/fastfat/fsctl.c +++ b/reactos/drivers/filesystems/fastfat/fsctl.c @@ -865,14 +865,16 @@ VfatLockOrUnlockVolume( { PFILE_OBJECT FileObject; PDEVICE_EXTENSION DeviceExt; + PVFATFCB Fcb; DPRINT("VfatLockOrUnlockVolume(%p, %d)\n", IrpContext, Lock); DeviceExt = IrpContext->DeviceExt; FileObject = IrpContext->FileObject; + Fcb = FileObject->FsContext; /* Only allow locking with the volume open */ - if (FileObject->FsContext != DeviceExt->VolumeFcb) + if (!(Fcb->Flags & FCB_IS_VOLUME)) { return STATUS_ACCESS_DENIED; }