• J
    ext4: stop providing .writepage hook · dae99960
    Jan Kara 提交于
    Now we don't need .writepage hook for anything anymore. Reclaim is
    fine with relying on .writepages to clean pages and we often couldn't
    do much from the .writepage callback anyway. We only need to provide
    .migrate_folio callback for the ext4_journalled_aops - let's use
    buffer_migrate_page_norefs() there so that buffers cannot be modified
    under jdb2's hands as that can cause data corruption. For example when
    commit code does writeout of transaction buffers in
    jbd2_journal_write_metadata_buffer(), we don't hold page lock or have
    page writeback bit set or have the buffer locked. So page migration
    code would go and happily migrate the page elsewhere while the copy is
    running thus corrupting data.
    Reviewed-by: NChristoph Hellwig <hch@lst.de>
    Signed-off-by: NJan Kara <jack@suse.cz>
    Link: https://lore.kernel.org/r/20221207112722.22220-12-jack@suse.czSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
    dae99960
inode.c 183.3 KB