https://git.reactos.org/?p=reactos.git;a=commitdiff;h=03d5be6437a1f2e4376ac117421133ebfdde799e
commit 03d5be6437a1f2e4376ac117421133ebfdde799e Author: Pierre Schweitzer <pie...@reactos.org> AuthorDate: Mon Nov 6 20:09:23 2017 +0100 [CDFS_NEW] Add a hack that allows locking a volume and thus, unmounting it. All that work, just to be able to do this... --- drivers/filesystems/cdfs_new/fsctrl.c | 10 ++++++++++ drivers/filesystems/cdfs_new/wdk_wnet_to_ros.diff | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/drivers/filesystems/cdfs_new/fsctrl.c b/drivers/filesystems/cdfs_new/fsctrl.c index 31c4965f9f..562bdc6482 100755 --- a/drivers/filesystems/cdfs_new/fsctrl.c +++ b/drivers/filesystems/cdfs_new/fsctrl.c @@ -225,6 +225,16 @@ Return Value: CdReleaseVcb( IrpContext, Vcb ); Status = CcWaitForCurrentLazyWriterActivity(); +#ifdef __REACTOS__ + if (Status == STATUS_NOT_IMPLEMENTED) + { + Status = STATUS_SUCCESS; + } + else + { + DbgPrint("CcWaitForCurrentLazyWriterActivity got implemented! Remove hack in %s:%s\n", __FILE__, __LINE__); + } +#endif // // This is intentional. If we were able to get the Vcb before, just diff --git a/drivers/filesystems/cdfs_new/wdk_wnet_to_ros.diff b/drivers/filesystems/cdfs_new/wdk_wnet_to_ros.diff index a4bface2e4..b27df5692d 100644 --- a/drivers/filesystems/cdfs_new/wdk_wnet_to_ros.diff +++ b/drivers/filesystems/cdfs_new/wdk_wnet_to_ros.diff @@ -895,6 +895,23 @@ Index: drivers/filesystems/cdfs_new/fsctrl.c CdIsVolumeDirty ( IN PIRP_CONTEXT IrpContext, IN PIRP Irp +@@ -225,6 +225,16 @@ + CdReleaseVcb( IrpContext, Vcb ); + + Status = CcWaitForCurrentLazyWriterActivity(); ++#ifdef __REACTOS__ ++ if (Status == STATUS_NOT_IMPLEMENTED) ++ { ++ Status = STATUS_SUCCESS; ++ } ++ else ++ { ++ DbgPrint("CcWaitForCurrentLazyWriterActivity got implemented! Remove hack in %s:%s\n", __FILE__, __LINE__); ++ } ++#endif + + // + // This is intentional. If we were able to get the Vcb before, just @@ -918,7 +919,7 @@ if (CdIsRemount( IrpContext, Vcb, &OldVcb )) {