• Jan Kara's avatar
    ext4: fix data corruption in data=journal mode · 3b136499
    Jan Kara authored
    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: default avatarAl Viro <viro@ZenIV.linux.org.uk>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    3b136499
inode.c 172 KB