• Jan Kara's avatar
    ext3: Improve truncate error handling · ee3e77f1
    Jan Kara authored
    New truncate calling convention allows us to handle errors from
    ext3_block_truncate_page(). So reorganize the code so that
    ext3_block_truncate_page() is called before we change inode size.
    
    This also removes unnecessary block zeroing from error recovery after failed
    buffered writes (zeroing isn't needed because we could have never written
    non-zero data to disk). We have to be careful and keep zeroing in direct IO
    write error recovery because there we might have already overwritten end of the
    last file block.
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    ee3e77f1
inode.c 103 KB