ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

NTSTATUS NTAPI RawClose ( IN PVCB  Vcb,
IN PIRP  Irp,
IN PIO_STACK_LOCATION  IoStackLocation 
)

Definition at line 126 of file rawfs.c.

Referenced by RawDispatch().

{
    NTSTATUS Status;
    BOOLEAN Deleted = FALSE;
    PAGED_CODE();

    /* Make sure we can clean up */
    Status = KeWaitForSingleObject(&Vcb->Mutex,
                                   Executive,
                                   KernelMode,
                                   FALSE,
                                   NULL);
    ASSERT(NT_SUCCESS(Status));

    /* Decrease the open count and check if this is a dismount */
    Vcb->OpenCount--;
    if (!Vcb->OpenCount) Deleted = RawCheckForDismount(Vcb, FALSE);

    /* Check if we should delete the device */
    KeReleaseMutex(&Vcb->Mutex, FALSE);
    if (Deleted)
    {
        /* Delete it */
        IoDeleteDevice((PDEVICE_OBJECT)CONTAINING_RECORD(Vcb,
                                                         VOLUME_DEVICE_OBJECT,
                                                         Vcb));
    }

    /* Complete the request */
    Irp->IoStatus.Status = STATUS_SUCCESS;
    IoCompleteRequest(Irp, IO_DISK_INCREMENT);
    return STATUS_SUCCESS;
}

Generated on Sat May 26 2012 06:06:30 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.