mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 17:03:12 -05:00
sys: FspFsvolCreateSharingViolationWork
This commit is contained in:
parent
e50c9ff649
commit
f05ebd9d20
@ -1063,6 +1063,8 @@ static NTSTATUS FspFsvolCreateSharingViolationWork(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!FlagOn(IrpSp->Parameters.Create.Options, FILE_COMPLETE_IF_OPLOCKED))
|
||||||
|
{
|
||||||
Result = FspOplockBreakH(FspFileNodeAddrOfOplock(FileNode), Irp, 0,
|
Result = FspOplockBreakH(FspFileNodeAddrOfOplock(FileNode), Irp, 0,
|
||||||
&Event, FspFsvolCreateSharingViolationOplockComplete, 0);
|
&Event, FspFsvolCreateSharingViolationOplockComplete, 0);
|
||||||
if (STATUS_PENDING == Result)
|
if (STATUS_PENDING == Result)
|
||||||
@ -1071,6 +1073,7 @@ static NTSTATUS FspFsvolCreateSharingViolationWork(
|
|||||||
if (STATUS_SUCCESS == Irp->IoStatus.Status)
|
if (STATUS_SUCCESS == Irp->IoStatus.Status)
|
||||||
StatusSharingViolation = FALSE;
|
StatusSharingViolation = FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
FspFileNodeRelease(FileNode, Main);
|
FspFileNodeRelease(FileNode, Main);
|
||||||
@ -1081,14 +1084,15 @@ exit:
|
|||||||
|
|
||||||
if (StatusSharingViolation)
|
if (StatusSharingViolation)
|
||||||
{
|
{
|
||||||
Response->IoStatus.Status = (UINT32)STATUS_SHARING_VIOLATION;
|
Irp->IoStatus.Information = OpbatchBreakUnderway ? FILE_OPBATCH_BREAK_UNDERWAY : 0;
|
||||||
Response->IoStatus.Information = OpbatchBreakUnderway ? FILE_OPBATCH_BREAK_UNDERWAY : 0;
|
return STATUS_SHARING_VIOLATION;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
FspIopRetryCompleteIrp(Irp, Response, &Result);
|
FspIopRetryCompleteIrp(Irp, Response, &Result);
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static VOID FspFsvolCreateSharingViolationOplockComplete(
|
static VOID FspFsvolCreateSharingViolationOplockComplete(
|
||||||
PVOID Context, PIRP Irp)
|
PVOID Context, PIRP Irp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user