It is really rude to clear all the buffer state bits on an access
beyond end-of-device. It can panic filesystems which have internal
state bits, for example. Just clear the dirty flag instead, and leave
the others intact.
--- linux-2.4-ext3push/drivers/block/ll_rw_blk.c.=K0000=.orig 2003-03-25 10:59:15.000000000 +0000
if (maxsector < count || maxsector - count < sector) {
/* Yecch */
- bh->b_state &= (1 << BH_Lock) | (1 << BH_Mapped);
+ bh->b_state &= ~(1 << BH_Dirty);
/* This may well happen - the kernel calls bread()
kdevname(bh->b_rdev), rw,
(sector + count)>>1, minorsize);
- /* Yecch again */
bh->b_end_io(bh, 0);
return;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/