mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
sys: IRP_MJ_CREATE
This commit is contained in:
parent
0d49e87468
commit
4a2d9295d7
@ -403,12 +403,14 @@ VOID FspFsvolCreateComplete(
|
|||||||
FsContext->UserContext = Response->Rsp.Create.UserContext;
|
FsContext->UserContext = Response->Rsp.Create.UserContext;
|
||||||
FileObject->FsContext2 = (PVOID)(UINT_PTR)Response->Rsp.Create.UserContext2;
|
FileObject->FsContext2 = (PVOID)(UINT_PTR)Response->Rsp.Create.UserContext2;
|
||||||
|
|
||||||
/* lock the file system volume device while accessing its generic table */
|
/*
|
||||||
|
* The following must be done under the file system volume device Resource,
|
||||||
|
* because we are manipulating its GenericTable and accessing foreign FsContext's.
|
||||||
|
*/
|
||||||
ExAcquireResourceExclusiveLite(&FsvolDeviceExtension->Base.Resource, TRUE);
|
ExAcquireResourceExclusiveLite(&FsvolDeviceExtension->Base.Resource, TRUE);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
/* insert the new FsContext into our generic table */
|
/* attempt to insert the newly created FsContext into our generic table */
|
||||||
Result = STATUS_SUCCESS;
|
|
||||||
FsContext = FspFsvolDeviceInsertContext(DeviceObject,
|
FsContext = FspFsvolDeviceInsertContext(DeviceObject,
|
||||||
FsContext->UserContext, FsContext, &Inserted);
|
FsContext->UserContext, FsContext, &Inserted);
|
||||||
if (0 == FsContext)
|
if (0 == FsContext)
|
||||||
@ -426,6 +428,7 @@ VOID FspFsvolCreateComplete(
|
|||||||
IoSetShareAccess(DesiredAccess, ShareAccess, FileObject,
|
IoSetShareAccess(DesiredAccess, ShareAccess, FileObject,
|
||||||
&FsContext->ShareAccess);
|
&FsContext->ShareAccess);
|
||||||
FspFileContextOpen(FsContext);
|
FspFileContextOpen(FsContext);
|
||||||
|
Result = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user