mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
dll: acquire exclusive lock during flush volume
This commit is contained in:
parent
82e4dcb4a1
commit
b88b2ec51d
@ -105,7 +105,8 @@ typedef NTSTATUS FSP_FILE_SYSTEM_OPERATION(FSP_FILE_SYSTEM *,
|
|||||||
* The fine-grained concurrency model applies the exclusive-shared lock as
|
* The fine-grained concurrency model applies the exclusive-shared lock as
|
||||||
* follows:
|
* follows:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>EXCL: SetVolumeLabel, Create, Cleanup(Delete), SetInformation(Rename)</li>
|
* <li>EXCL: SetVolumeLabel, Flush(Volume),
|
||||||
|
* Create, Cleanup(Delete), SetInformation(Rename)</li>
|
||||||
* <li>SHRD: GetVolumeInfo, Open, SetInformation(Disposition), ReadDirectory</li>
|
* <li>SHRD: GetVolumeInfo, Open, SetInformation(Disposition), ReadDirectory</li>
|
||||||
* <li>NONE: all other operations</li>
|
* <li>NONE: all other operations</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
@ -29,7 +29,9 @@ FSP_API NTSTATUS FspFileSystemOpEnter(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
Request->Req.Cleanup.Delete) ||
|
Request->Req.Cleanup.Delete) ||
|
||||||
(FspFsctlTransactSetInformationKind == Request->Kind &&
|
(FspFsctlTransactSetInformationKind == Request->Kind &&
|
||||||
10/*FileRenameInformation*/ == Request->Req.SetInformation.FileInformationClass) ||
|
10/*FileRenameInformation*/ == Request->Req.SetInformation.FileInformationClass) ||
|
||||||
FspFsctlTransactSetVolumeInformationKind == Request->Kind)
|
FspFsctlTransactSetVolumeInformationKind == Request->Kind ||
|
||||||
|
(FspFsctlTransactFlushBuffersKind == Request->Kind &&
|
||||||
|
0 == Request->Req.FlushBuffers.UserContext))
|
||||||
{
|
{
|
||||||
AcquireSRWLockExclusive(&FileSystem->OpGuardLock);
|
AcquireSRWLockExclusive(&FileSystem->OpGuardLock);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user