mtd/drivers/mtd mtd_blkdevs-24.c,1.13,1.14

David Woodhouse dwmw2 at infradead.org
Mon Sep 8 08:45:59 EDT 2003


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

Modified Files:
	mtd_blkdevs-24.c 
Log Message:
	  <viro_zzz> dwmw2: BLOCK_SIZE_BITS has nothing to do with block devices
	  <viro> dwmw2: any code which sets blk_size[][] should be 
			size >> 10 /+ 2.4 and its dumb units */


Index: mtd_blkdevs-24.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtd_blkdevs-24.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mtd_blkdevs-24.c	8 Sep 2003 11:37:24 -0000	1.13
+++ mtd_blkdevs-24.c	8 Sep 2003 12:45:56 -0000	1.14
@@ -124,7 +124,7 @@
 	   actually want to deal with signals. We can't just call 
 	   exit_sighand() since that'll cause an oops when we finally
 	   do exit. */
-#if 1
+#if 0
 	spin_lock_irq(&current->sigmask_lock);
 	sigfillset(&current->blocked);
 	recalc_sigpending(current);
@@ -465,10 +465,13 @@
 		tr->blkcore_priv->part_table[i].start_sect = 0;
 	}
 
-	/* 2.4 kernel takes block device size in BLOCK_SIZE_BITS 
-	   (usually 10), rather than in units of its own blksize. */
+	/*
+	  <viro_zzz> dwmw2: BLOCK_SIZE_BITS has nothing to do with block devices
+	  <viro> dwmw2: any code which sets blk_size[][] should be 
+			size >> 10 /+ 2.4 and its dumb units */
+
 	tr->blkcore_priv->sizes[new->devnum << tr->part_bits] = 
-		(new->size * new->blksize) >> BLOCK_SIZE_BITS;
+		(new->size * new->blksize) >> 10; /* 2.4 and its dumb units */
 
 	/* But this is still in device's sectors? $DEITY knows */
 	tr->blkcore_priv->part_table[new->devnum << tr->part_bits].nr_sects = new->size;




More information about the linux-mtd-cvs mailing list