1
0
mirror of https://github.com/winfsp/winfsp.git synced 2026-06-04 11:56:54 -05:00

sys, dll: convert memory barriers to interlocked operations

This commit is contained in:
Bill Zissimopoulos
2022-01-19 10:55:46 +00:00
parent 362b9ceb7c
commit 29251dc2be
10 changed files with 55 additions and 64 deletions
+3 -5
View File
@@ -177,8 +177,7 @@ static NTSTATUS FspFsvolQueryAllInformation(PFILE_OBJECT FileObject,
return FspFsvolQueryNameInformation(FileObject, PBuffer, BufferEnd);
}
DeletePending = 0 != FileNode->DeletePending;
MemoryBarrier();
DeletePending = FspFileNodeDeletePending(FileNode);
Info->BasicInformation.CreationTime.QuadPart = FileInfo->CreationTime;
Info->BasicInformation.LastAccessTime.QuadPart = FileInfo->LastAccessTime;
@@ -422,8 +421,7 @@ static NTSTATUS FspFsvolQueryStandardInformation(PFILE_OBJECT FileObject,
return STATUS_SUCCESS;
}
DeletePending = 0 != FileNode->DeletePending;
MemoryBarrier();
DeletePending = FspFileNodeDeletePending(FileNode);
Info->AllocationSize.QuadPart = FileInfo->AllocationSize;
Info->EndOfFile.QuadPart = FileInfo->FileSize;
@@ -1626,7 +1624,7 @@ static NTSTATUS FspFsvolSetDispositionInformationSuccess(
UINT32 DispositionFlags = Request->Req.SetInformation.Info.DispositionEx.Flags;
BOOLEAN Delete = BooleanFlagOn(DispositionFlags, FILE_DISPOSITION_DELETE);
FileNode->DeletePending = Delete;
FspFileNodeSetDeletePending(FileNode, Delete);
FileObject->DeletePending = Delete;
if (!Delete)