|
15 | 15 |
|
16 | 16 | #include <linux/uio.h>
|
17 | 17 | #include <linux/blkdev.h>
|
| 18 | +#include <linux/mpage.h> |
18 | 19 | #include "affs.h"
|
19 | 20 |
|
20 | 21 | static struct buffer_head *affs_get_extblock_slow(struct inode *inode, u32 ext);
|
@@ -370,9 +371,10 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul
|
370 | 371 | return -ENOSPC;
|
371 | 372 | }
|
372 | 373 |
|
373 |
| -static int affs_writepage(struct page *page, struct writeback_control *wbc) |
| 374 | +static int affs_writepages(struct address_space *mapping, |
| 375 | + struct writeback_control *wbc) |
374 | 376 | {
|
375 |
| - return block_write_full_page(page, affs_get_block, wbc); |
| 377 | + return mpage_writepages(mapping, wbc, affs_get_block); |
376 | 378 | }
|
377 | 379 |
|
378 | 380 | static int affs_read_folio(struct file *file, struct folio *folio)
|
@@ -456,10 +458,11 @@ const struct address_space_operations affs_aops = {
|
456 | 458 | .dirty_folio = block_dirty_folio,
|
457 | 459 | .invalidate_folio = block_invalidate_folio,
|
458 | 460 | .read_folio = affs_read_folio,
|
459 |
| - .writepage = affs_writepage, |
| 461 | + .writepages = affs_writepages, |
460 | 462 | .write_begin = affs_write_begin,
|
461 | 463 | .write_end = affs_write_end,
|
462 | 464 | .direct_IO = affs_direct_IO,
|
| 465 | + .migrate_folio = buffer_migrate_folio, |
463 | 466 | .bmap = _affs_bmap
|
464 | 467 | };
|
465 | 468 |
|
@@ -835,9 +838,10 @@ const struct address_space_operations affs_aops_ofs = {
|
835 | 838 | .dirty_folio = block_dirty_folio,
|
836 | 839 | .invalidate_folio = block_invalidate_folio,
|
837 | 840 | .read_folio = affs_read_folio_ofs,
|
838 |
| - //.writepage = affs_writepage_ofs, |
| 841 | + //.writepages = affs_writepages_ofs, |
839 | 842 | .write_begin = affs_write_begin_ofs,
|
840 |
| - .write_end = affs_write_end_ofs |
| 843 | + .write_end = affs_write_end_ofs, |
| 844 | + .migrate_folio = filemap_migrate_folio, |
841 | 845 | };
|
842 | 846 |
|
843 | 847 | /* Free any preallocated blocks. */
|
|
0 commit comments