|
35 | 35 | #include <linux/string.h>
|
36 | 36 | #include <linux/mm.h>
|
37 | 37 | #include <linux/buffer_head.h>
|
| 38 | +#include <linux/mpage.h> |
38 | 39 | #include <linux/writeback.h>
|
39 | 40 | #include <linux/iversion.h>
|
40 | 41 |
|
@@ -390,7 +391,7 @@ ufs_inode_getblock(struct inode *inode, u64 ind_block,
|
390 | 391 |
|
391 | 392 | /**
|
392 | 393 | * ufs_getfrag_block() - `get_block_t' function, interface between UFS and
|
393 |
| - * read_folio, writepage and so on |
| 394 | + * read_folio, writepages and so on |
394 | 395 | */
|
395 | 396 |
|
396 | 397 | static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create)
|
@@ -467,9 +468,10 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff
|
467 | 468 | return 0;
|
468 | 469 | }
|
469 | 470 |
|
470 |
| -static int ufs_writepage(struct page *page, struct writeback_control *wbc) |
| 471 | +static int ufs_writepages(struct address_space *mapping, |
| 472 | + struct writeback_control *wbc) |
471 | 473 | {
|
472 |
| - return block_write_full_page(page,ufs_getfrag_block,wbc); |
| 474 | + return mpage_writepages(mapping, wbc, ufs_getfrag_block); |
473 | 475 | }
|
474 | 476 |
|
475 | 477 | static int ufs_read_folio(struct file *file, struct folio *folio)
|
@@ -528,9 +530,10 @@ const struct address_space_operations ufs_aops = {
|
528 | 530 | .dirty_folio = block_dirty_folio,
|
529 | 531 | .invalidate_folio = block_invalidate_folio,
|
530 | 532 | .read_folio = ufs_read_folio,
|
531 |
| - .writepage = ufs_writepage, |
| 533 | + .writepages = ufs_writepages, |
532 | 534 | .write_begin = ufs_write_begin,
|
533 | 535 | .write_end = ufs_write_end,
|
| 536 | + .migrate_folio = buffer_migrate_folio, |
534 | 537 | .bmap = ufs_bmap
|
535 | 538 | };
|
536 | 539 |
|
|
0 commit comments