__block_prepare_write(): bug?

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Wed Apr 05 2000 - 05:36:18 EST


AFAICS the memset() for new buffer blocks is wrong:

     memset(kaddr+to,0, block_end-to)

It should be

    memset(kaddr+max(to,block_start),0,block_end-to)

example:
1 kB block size,
block 0: "old"
block 1: "old"
block 2: new
block 3: new
from=0
to=512

now the memset will overwrite the contents of of block 1 when it initializes
block 2 or 3.

--
    Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:14 EST