Author: ion Date: Sun Jul 2 10:18:55 2006 New Revision: 22766
URL: http://svn.reactos.org/svn/reactos?rev=22766&view=rev Log: - Small optimization: don't bother to get the File System Listhead we'll parse if we're going to fail because of wrong VPB flags later... get the list only after we're sure we need it.
Modified: trunk/reactos/ntoskrnl/io/iomgr/volume.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/volume.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/volume.c?... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/volume.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/volume.c Sun Jul 2 10:18:55 2006 @@ -316,10 +316,9 @@ PIRP Irp; PIO_STACK_LOCATION StackPtr; PLIST_ENTRY FsList, ListEntry; - PDEVICE_OBJECT ParentFsDeviceObject; + LIST_ENTRY LocalList; PDEVICE_OBJECT AttachedDeviceObject = DeviceObject; - PDEVICE_OBJECT FileSystemDeviceObject; - LIST_ENTRY LocalList; + PDEVICE_OBJECT FileSystemDeviceObject, ParentFsDeviceObject; ULONG FsStackOverhead; PAGED_CODE();
@@ -343,24 +342,6 @@ KeEnterCriticalRegion(); ExAcquireResourceSharedLite(&FileSystemListLock, TRUE);
- /* For a mount operation, this can only be a Disk, CD-ROM or tape */ - if ((DeviceObject->DeviceType == FILE_DEVICE_DISK) || - (DeviceObject->DeviceType == FILE_DEVICE_VIRTUAL_DISK)) - { - /* Use the disk list */ - FsList = &IopDiskFsListHead; - } - else if (DeviceObject->DeviceType == FILE_DEVICE_CD_ROM) - { - /* Use the CD-ROM list */ - FsList = &IopCdRomFsListHead; - } - else - { - /* It's gotta be a tape... */ - FsList = &IopTapeFsListHead; - } - /* Make sure we weren't already mounted */ if (!(DeviceObject->Vpb->Flags & (VPB_MOUNTED | VPB_REMOVE_PENDING))) { @@ -376,6 +357,24 @@
/* Reference it */ ObReferenceObject(AttachedDeviceObject); + + /* For a mount operation, this can only be a Disk, CD-ROM or tape */ + if ((DeviceObject->DeviceType == FILE_DEVICE_DISK) || + (DeviceObject->DeviceType == FILE_DEVICE_VIRTUAL_DISK)) + { + /* Use the disk list */ + FsList = &IopDiskFsListHead; + } + else if (DeviceObject->DeviceType == FILE_DEVICE_CD_ROM) + { + /* Use the CD-ROM list */ + FsList = &IopCdRomFsListHead; + } + else + { + /* It's gotta be a tape... */ + FsList = &IopTapeFsListHead; + }
/* Now loop the fs list until one of the file systems accepts us */ Status = STATUS_UNSUCCESSFUL;