mtd/drivers/mtd mtdblock_ro.c,1.13,1.14

Eugene Surovegin ebs at infradead.org
Wed Oct 30 04:02:20 EST 2002


Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv20042

Modified Files:
	mtdblock_ro.c 
Log Message:

Fixes: nr_sectors -> current_nr_sectors, 
       blk_size[] is cleared in cleanup_mtdblock


Index: mtdblock_ro.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdblock_ro.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mtdblock_ro.c	11 Mar 2002 16:03:29 -0000	1.13
+++ mtdblock_ro.c	30 Oct 2002 09:02:17 -0000	1.14
@@ -141,11 +141,11 @@
       }
 
       if (current_request->sector << 9 > mtd->size ||
-	  (current_request->sector + current_request->nr_sectors) << 9 > mtd->size)
+	  (current_request->sector + current_request->current_nr_sectors) << 9 > mtd->size)
       {
 	 printk("mtd: Attempt to read past end of device!\n");
 	 printk("size: %x, sector: %lx, nr_sectors %lx\n", mtd->size, 
-		 current_request->sector, current_request->nr_sectors);
+		 current_request->sector, current_request->current_nr_sectors);
 	 end_request(0);
 	 continue;
       }
@@ -166,7 +166,7 @@
 
 	 case READ:
 	 if (MTD_READ(mtd,current_request->sector<<9, 
-		      current_request->nr_sectors << 9, 
+		      current_request->current_nr_sectors << 9, 
 		      &retlen, current_request->buffer) == 0)
 	    res = 1;
 	 else
@@ -176,7 +176,7 @@
 	 case WRITE:
 
 	 /* printk("mtdblock_request WRITE sector=%d(%d)\n",current_request->sector,
-		current_request->nr_sectors);
+		current_request->current_nr_sectors);
 	 */
 
 	 // Read only device
@@ -188,7 +188,7 @@
 
 	 // Do the write
 	 if (MTD_WRITE(mtd,current_request->sector<<9, 
-		       current_request->nr_sectors << 9, 
+		       current_request->current_nr_sectors << 9, 
 		       &retlen, current_request->buffer) == 0)
 	    res = 1;
 	 else
@@ -294,7 +294,7 @@
 static void __exit cleanup_mtdblock(void)
 {
 	unregister_blkdev(MAJOR_NR,DEVICE_NAME);
-	blksize_size[MAJOR_NR] = NULL;
+	blk_size[MAJOR_NR] = NULL;
 	blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
 }
 





More information about the linux-mtd-cvs mailing list