fs/ntfs/aops.c::ntfs_mft_writepage().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
the bug check from fs/ntfs/aops.c::ntfs_write_mst_block(). It is in
fact required to write outside initialized size when preparing to
extend the initialized size.
+ - Map the page instead of using page_address() before writing to it in
+ fs/ntfs/aops.c::ntfs_mft_writepage().
2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
if (!nr_bhs)
goto done;
/* Apply the mst protection fixups. */
- kaddr = page_address(page);
+ kaddr = kmap(page);
for (i = 0; i < nr_bhs; i++) {
if (!(i % bhs_per_rec)) {
err = pre_write_mst_fixup((NTFS_RECORD*)(kaddr +
bh_offset(bhs[i])));
}
flush_dcache_page(page);
+ kunmap(page);
if (unlikely(err)) {
/* I/O error during writing. This is really bad! */
ntfs_error(vol->sb, "I/O error while writing ntfs record "
post_write_mst_fixup((NTFS_RECORD*)(kaddr +
bh_offset(bhs[i])));
}
+ kunmap(page);
cleanup_out:
/* Clean the buffers. */
for (i = 0; i < nr_bhs; i++)