Hi ! I've read the discussion about the truncate() problem and tried to understand ;) However, there's somethign I don't catch in your code (typo ? bug ? misunderstanding on my side ?) Linus wrote: There's a really simple way to avoid this: compare the thing you're going to zero out against zero before you memset() it to zero. If it was already zero, you just unlock the page and release. Your code does: >+ kaddr = (char*)kmap(page); >+ err = 0; >+ if (!mem_is_zero(kaddr+offset, length)) >+ goto unmap; >+ memset(kaddr+offset, 0, length); >+ flush_dcache_page(page); >+ __block_commit_write(inode, page, offset, offset+length); >+unmap: >+ kunmap(page); Which seem to be the the opposite of what Linus says: You memset() the page when it's _already_ zero and exit when it's not. Ben. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
- Re: 2.4.0-test8-pre1 is quite bad Ari Pollak
- 2.4.0-test8-pre1 is quite bad / how about integrati... bert hubert
- Re: 2.4.0-test8-pre1 is quite bad / how about ... Rik van Riel
- Re: 2.4.0-test8-pre1 is quite bad / how ab... Linus Torvalds
- Re: 2.4.0-test8-pre1 is quite bad / ho... Rik van Riel
- Re: 2.4.0-test8-pre1 is quite bad ... Linus Torvalds
- Re: 2.4.0-test8-pre1 is quite... Henrik Størner
- Re: 2.4.0-test8-pre1 is quite... Linus Torvalds
- Re: 2.4.0-test8-pre1 is quite... Henrik Størner
- Re: 2.4.0-test8-pre1 is quite... Alexander Viro
- Re: 2.4.0-test8-pre1 is quite... Benjamin Herrenschmidt
- Re: 2.4.0-test8-pre1 is quite... Alexander Viro
- Re: 2.4.0-test8-pre1 is quite... Alexander Viro
- Re: 2.4.0-test8-pre1 is quite... Linus Torvalds
- Re: 2.4.0-test8-pre1 is quite... Alexander Viro
- Re: 2.4.0-test8-pre1 is quite... Linus Torvalds
- Re: 2.4.0-test8-pre1 is quite... Alexander Viro
- Re: 2.4.0-test8-pre1 is quite... Alexander Viro
- Re: 2.4.0-test8-pre1 is quite... Alexander Viro
- Re: 2.4.0-test8-pre1 is quite... Chris Mason
- Re: 2.4.0-test8-pre1 is quite... bert hubert