patch-2.4.3 linux/drivers/block/ll_rw_blk.c
Next file: linux/drivers/block/loop.c
Previous file: linux/drivers/atm/nicstar.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Fri Mar 23 11:45:28 2001
- Orig file:
v2.4.2/linux/drivers/block/ll_rw_blk.c
- Orig date:
Wed Feb 21 18:20:18 2001
diff -u --recursive --new-file v2.4.2/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
@@ -954,6 +954,8 @@
*/
void submit_bh(int rw, struct buffer_head * bh)
{
+ int count = bh->b_size >> 9;
+
if (!test_bit(BH_Lock, &bh->b_state))
BUG();
@@ -964,16 +966,16 @@
* further remap this.
*/
bh->b_rdev = bh->b_dev;
- bh->b_rsector = bh->b_blocknr * (bh->b_size >> 9);
+ bh->b_rsector = bh->b_blocknr * count;
generic_make_request(rw, bh);
switch (rw) {
case WRITE:
- kstat.pgpgout++;
+ kstat.pgpgout += count;
break;
default:
- kstat.pgpgin++;
+ kstat.pgpgin += count;
break;
}
}
@@ -1238,9 +1240,6 @@
#endif
#ifdef CONFIG_BLK_DEV_RAM
rd_init();
-#endif
-#ifdef CONFIG_BLK_DEV_LOOP
- loop_init();
#endif
#ifdef CONFIG_ISP16_CDI
isp16_init();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)