sys: IRP_MJ_CREATE: refactoring to support Overwrite

This commit is contained in:
Bill Zissimopoulos
2016-01-07 15:42:53 -08:00
parent 9b93df1788
commit 16895a5b68
5 changed files with 343 additions and 133 deletions

View File

@ -60,19 +60,8 @@ static NTSTATUS FspFsvolCleanup(
UINT64 UserContext = FsContext->UserContext;
UINT64 UserContext2 = (UINT_PTR)FileObject->FsContext2;
FSP_FSCTL_TRANSACT_REQ *Request;
LONG OpenCount;
/* all handles on this FileObject are gone; close the FileObject */
OpenCount = FspFileContextClose(FsContext);
/* is the FsContext going away as well? */
if (0 == OpenCount)
{
/* remove the FsContext from the volume device generic table */
FspFsvolDeviceLockContextTable(FsvolDeviceObject);
FspFsvolDeviceDeleteContext(FsvolDeviceObject, FsContext->UserContext, 0);
FspFsvolDeviceUnlockContextTable(FsvolDeviceObject);
}
FspFileContextClose(FsvolDeviceObject, FsContext);
/* create the user-mode file system request; MustSucceed because IRP_MJ_CLEANUP cannot fail */
FspIopCreateRequestMustSucceed(Irp, FileNameRequired ? &FsContext->FileName : 0, 0, &Request);