[RDBSS]
authorPierre Schweitzer <pierre@reactos.org>
Thu, 27 Jul 2017 09:37:10 +0000 (09:37 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Thu, 27 Jul 2017 09:37:10 +0000 (09:37 +0000)
- Misc fixes with DPRINTS

[RXCE]
- In RxFinalizeSrvOpen, always dereference the FCB, it's always referenced on SRV_OPEN creation
- Misc fixes with DPRINTS

With that revision and r75419, I'm now able to mount a NFS share, browse it, read a file from it, and unmount it.
We're OK regarding references counting!

CORE-8204
CORE-11327
CORE-13581

svn path=/trunk/; revision=75420

reactos/sdk/lib/drivers/rdbsslib/rdbss.c
reactos/sdk/lib/drivers/rxce/rxce.c

index f63943a..81e13fd 100644 (file)
@@ -5664,6 +5664,11 @@ RxFindOrCreateFcb(
     /* If FCB was not found or is not covering full path, prepare for more work */
     if (Fcb == NULL || Fcb->FcbTableEntry.Path.Length != NetRootName->Length)
     {
+        if (Fcb != NULL)
+        {
+            DPRINT1("FCB was found and it's not covering the whole path: %wZ - %wZ\n", &Fcb->FcbTableEntry.Path, NetRootName);
+        }
+
         if (!AcquiredExclusive)
         {
             RxReleaseFcbTableLock(&NetRoot->FcbTable);
@@ -6354,7 +6359,7 @@ RxFspDispatch(
         RxContext->LastExecutionThread = PsGetCurrentThread();
         SetFlag(RxContext->Flags, (RX_CONTEXT_FLAG_IN_FSP | RX_CONTEXT_FLAG_WAIT));
 
-        DPRINT("Dispatch: MN: %d, Ctxt: %p, IRP: %p, THRD: %lx #%lx", RxContext->MinorFunction,
+        DPRINT("Dispatch: MN: %d, Ctxt: %p, IRP: %p, THRD: %lx #%lx\n", RxContext->MinorFunction,
                RxContext, RxContext->CurrentIrp, RxContext->LastExecutionThread,
                RxContext->SerialNumber);
 
index c5686a5..6a6b066 100644 (file)
@@ -412,6 +412,8 @@ RxAllocateFcbObject(
         FsRtlSetupAdvancedHeader(Fcb, &NonPagedFcb->AdvancedFcbHeaderMutex);
     }
 
+    DPRINT("Allocated %p\n", Buffer);
+
     return Buffer;
 }
 
@@ -3158,11 +3160,10 @@ RxFinalizeSrvOpen(
         RemoveEntryList(&ThisSrvOpen->SrvOpenQLinks);
     }
 
-    /* If enclosed allocation, mark the memory zone free and dereference FCB */
+    /* If enclosed allocation, mark the memory zone free */
     if (BooleanFlagOn(ThisSrvOpen->Flags, SRVOPEN_FLAG_ENCLOSED_ALLOCATED))
     {
         ClearFlag(Fcb->FcbState, FCB_STATE_SRVOPEN_USED);
-        RxDereferenceNetFcb(Fcb);
     }
     /* Otherwise, free the memory */
     else
@@ -3170,6 +3171,8 @@ RxFinalizeSrvOpen(
         RxFreeFcbObject(ThisSrvOpen);
     }
 
+    RxDereferenceNetFcb(Fcb);
+
     return TRUE;
 }
 
@@ -4089,6 +4092,8 @@ RxFreeFcbObject(
 {
     PAGED_CODE();
 
+    DPRINT("Freeing %p\n", Object);
+
     /* If that's a FOBX/SRV_OPEN, nothing to do, just free it */
     if (NodeType(Object) == RDBSS_NTC_FOBX || NodeType(Object) == RDBSS_NTC_SRVOPEN)
     {