sys: FspFsvolCreateSharingViolationWork

This commit is contained in:
Bill Zissimopoulos 2016-11-10 18:14:17 -08:00
parent e50c9ff649
commit f05ebd9d20

View File

@ -1063,6 +1063,8 @@ static NTSTATUS FspFsvolCreateSharingViolationWork(
}
}
if (!FlagOn(IrpSp->Parameters.Create.Options, FILE_COMPLETE_IF_OPLOCKED))
{
Result = FspOplockBreakH(FspFileNodeAddrOfOplock(FileNode), Irp, 0,
&Event, FspFsvolCreateSharingViolationOplockComplete, 0);
if (STATUS_PENDING == Result)
@ -1071,6 +1073,7 @@ static NTSTATUS FspFsvolCreateSharingViolationWork(
if (STATUS_SUCCESS == Irp->IoStatus.Status)
StatusSharingViolation = FALSE;
}
}
exit:
FspFileNodeRelease(FileNode, Main);
@ -1081,14 +1084,15 @@ exit:
if (StatusSharingViolation)
{
Response->IoStatus.Status = (UINT32)STATUS_SHARING_VIOLATION;
Response->IoStatus.Information = OpbatchBreakUnderway ? FILE_OPBATCH_BREAK_UNDERWAY : 0;
Irp->IoStatus.Information = OpbatchBreakUnderway ? FILE_OPBATCH_BREAK_UNDERWAY : 0;
return STATUS_SHARING_VIOLATION;
}
else
{
FspIopRetryCompleteIrp(Irp, Response, &Result);
return Result;
}
}
static VOID FspFsvolCreateSharingViolationOplockComplete(
PVOID Context, PIRP Irp)