/*
- * Copyright (c) 2008, 2009, 2010, 2011 Kernel Drivers, LLC.
- * Copyright (c) 2009, 2010, 2011 Your File System, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Kernel Drivers, LLC.
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013 Your File System, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
- * notice,
- * this list of conditions and the following disclaimer in the
- * documentation
- * and/or other materials provided with the distribution.
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
* - Neither the names of Kernel Drivers, LLC and Your File System, Inc.
* nor the names of their contributors may be used to endorse or promote
* products derived from this software without specific prior written
pCcb = (AFSCcb *)pIrpSp->FileObject->FsContext2;
+ pIrpSp->FileObject->FsContext2 = NULL;
+
//
// Send the close to the CM
//
AFSReleaseResource( &pFcb->NPFcb->Resource);
+ pIrpSp->FileObject->FsContext = NULL;
+
lCount = InterlockedDecrement( &pFcb->OpenReferenceCount);
AFSDbgTrace(( AFS_SUBSYSTEM_FCB_REF_COUNTING,
pCcb = (AFSCcb *)pIrpSp->FileObject->FsContext2;
+ pIrpSp->FileObject->FsContext2;
+
//
// Remove the Ccb and de-allocate it
//
AFSReleaseResource( &pFcb->NPFcb->Resource);
+ pIrpSp->FileObject->FsContext = NULL;
+
lCount = InterlockedDecrement( &pFcb->OpenReferenceCount);
AFSDbgTrace(( AFS_SUBSYSTEM_FCB_REF_COUNTING,
pCcb = (AFSCcb *)pIrpSp->FileObject->FsContext2;
+ pIrpSp->FileObject->FsContext2 = NULL;
+
//
// We may be performing some cleanup on the Fcb so grab it exclusive to ensure no collisions
//
pParentObjectInfo->Specific.Directory.ChildOpenReferenceCount));
}
+ pIrpSp->FileObject->FsContext = NULL;
+
//
// Decrement the reference count on the Fcb. this is protecting it from teardown.
//
pCcb = (AFSCcb *)pIrpSp->FileObject->FsContext2;
+ pIrpSp->FileObject->FsContext2 = NULL;
+
//
// Object the Parent ObjectInformationCB
//
AFSReleaseResource( &pFcb->NPFcb->Resource);
+ pIrpSp->FileObject->FsContext = NULL;
+
lCount = InterlockedDecrement( &pFcb->OpenReferenceCount);
AFSDbgTrace(( AFS_SUBSYSTEM_FCB_REF_COUNTING,
}
default:
+ {
AFSDbgTrace(( AFS_SUBSYSTEM_FILE_PROCESSING,
AFS_TRACE_LEVEL_ERROR,
pFcb->Header.NodeTypeCode));
break;
+ }
}
try_exit: