Commit in reactos/ntoskrnl/cc on MAIN
copy.c+6-231.25 -> 1.26
backed out bugified patch

reactos/ntoskrnl/cc
copy.c 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- copy.c	19 Jun 2004 08:53:35 -0000	1.25
+++ copy.c	20 Jun 2004 02:10:07 -0000	1.26
@@ -1,4 +1,4 @@
-/* $Id: copy.c,v 1.25 2004/06/19 08:53:35 vizzini Exp $
+/* $Id: copy.c,v 1.26 2004/06/20 02:10:07 vizzini Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -139,12 +139,7 @@
 	  /*
 	   * Create an MDL which contains all their pages.
 	   */
-	  Mdl = MmCreateMdl(NULL, NULL, current_size);
-	  if(Mdl == NULL) {
-		DPRINT("MmCreateMdl: Out of memory!");
-		return(STATUS_NO_MEMORY);
-	  }
-
+          MmInitializeMdl(Mdl, NULL, current_size);
 	  Mdl->MdlFlags |= (MDL_PAGES_LOCKED | MDL_IO_PAGE_READ);
 	  current2 = current;
 	  offset = 0;
@@ -227,14 +222,8 @@
     {
       Size = CacheSeg->Bcb->CacheSegmentSize;
     }
-
-  Mdl = MmCreateMdl(NULL, CacheSeg->BaseAddress, Size);
-  if(Mdl == NULL) 
-    {
-      DPRINT("MmCreateMdl: Out of memory!");
-      return(STATUS_NO_MEMORY);
-    }  
-
+  Mdl = alloca(MmSizeOfMdl(CacheSeg->BaseAddress, Size));
+  MmInitializeMdl(Mdl, CacheSeg->BaseAddress, Size);
   MmBuildMdlForNonPagedPool(Mdl);
   Mdl->MdlFlags |= MDL_IO_PAGE_READ;
   KeInitializeEvent(&Event, NotificationEvent, FALSE);
@@ -275,14 +264,8 @@
     {
       Size = CacheSeg->Bcb->CacheSegmentSize;
     }
-
-  Mdl = MmCreateMdl(NULL, CacheSeg->BaseAddress, Size);
-  if(Mdl == NULL) 
-    {
-      DPRINT("MmCreateMdl: Out of memory!");
-      return(STATUS_NO_MEMORY);
-    }  
-
+  Mdl = alloca(MmSizeOfMdl(CacheSeg->BaseAddress, Size));
+  MmInitializeMdl(Mdl, CacheSeg->BaseAddress, Size);
   MmBuildMdlForNonPagedPool(Mdl);
   Mdl->MdlFlags |= MDL_IO_PAGE_READ;
   KeInitializeEvent(&Event, NotificationEvent, FALSE);
CVSspam 0.2.8