- Remove AddrFileEntry from CONNECTION_ENDPOINT. It's no longer needed.

- Fixed acquiring a spin lock in FileCloseConnection.

svn path=/trunk/; revision=8002
This commit is contained in:
Filip Navara 2004-02-02 21:02:48 +00:00
parent 8a81d07bde
commit 994fed8844
3 changed files with 3 additions and 7 deletions

View file

@ -301,7 +301,6 @@ typedef enum {
to this structure */
typedef struct _CONNECTION_ENDPOINT {
LIST_ENTRY ListEntry; /* Entry on list */
LIST_ENTRY AddrFileEntry; /* Entry on address file list */
KSPIN_LOCK Lock; /* Spin lock to protect this structure */
ULONG RefCount; /* Number of references to this object */
PVOID ClientContext; /* Pointer to client context information */

View file

@ -425,12 +425,10 @@ NTSTATUS DispTdiDisassociateAddress(
return STATUS_INVALID_PARAMETER;
}
KeAcquireSpinLock(&Connection->Lock, &OldIrql);
RemoveEntryList(&Connection->AddrFileEntry);
KeReleaseSpinLock(&Connection->Lock, OldIrql);
/* Remove the reference put on the address file object */
KeAcquireSpinLock(&Connection->Lock, &OldIrql);
DereferenceObject(Connection->AddressFile);
KeReleaseSpinLock(&Connection->Lock, OldIrql);
return STATUS_SUCCESS;
}

View file

@ -141,7 +141,6 @@ VOID DeleteConnectionEndpoint(
/* Dereference and remove the address file if it exists */
if (Connection->AddressFile) {
RemoveEntryList(&Connection->AddrFileEntry);
DereferenceObject(Connection->AddressFile);
}
@ -483,8 +482,8 @@ NTSTATUS FileCloseConnection(
Connection = Request->Handle.ConnectionContext;
KeAcquireSpinLock(&Connection->Lock, &OldIrql);
#if 0
KeAcquireSpinLock(&Connection->Lock, &OldIrql);
if ((!AF_IS_BUSY(Connection)) && (Connection->RefCount == 1)) {
/* Set connection endpoint file object exclusive to us */
AF_SET_BUSY(Connection);