patch-1.3.71 linux/drivers/block/md.c

Next file: linux/drivers/cdrom/cm206.c
Previous file: linux/drivers/block/loop.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.70/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -175,7 +175,7 @@
        paging). This is NOT done by fdisk when partitionning,
        but that's a DOS thing anyway... */
     
-    devices[minor][index].size=gen_real->sizes[MINOR(dev)] & (PAGE_MASK>>10);
+    devices[minor][index].size=gen_real->sizes[MINOR(dev)] & ~((PAGE_SIZE >> 10)-1);
     devices[minor][index].offset=index ?
       (devices[minor][index-1].offset + devices[minor][index-1].size) : 0;
 
@@ -461,10 +461,12 @@
 	 || major == IDE3_MAJOR)
 	&& (req = blk_dev[major].current_request))
     {
-#ifdef CONFIG_BLK_DEV_HD
-      if (major == HD_MAJOR)
+      /*
+       * Thanx to Gadi Oxman <gadio@netvision.net.il>
+       * (He reads my own code better than I do... ;-)
+       */
+      if (major != SCSI_DISK_MAJOR)
 	req = req->next;
-#endif CONFIG_BLK_DEV_HD
 
       while (req && !found)
       {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this