• J
    ext4: fix data corruption in data=journal mode · 3b136499
    Jan Kara 提交于
    ext4_journalled_write_end() did not propely handle all the cases when
    generic_perform_write() did not copy all the data into the target page
    and could mark buffers with uninitialized contents as uptodate and dirty
    leading to possible data corruption (which would be quickly fixed by
    generic_perform_write() retrying the write but still). Fix the problem
    by carefully handling the case when the page that is written to is not
    uptodate.
    
    CC: stable@vger.kernel.org
    Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
    Signed-off-by: NJan Kara <jack@suse.cz>
    Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
    3b136499
inode.c 171.6 KB