Skip to content

Commit af34acc

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
ufs: remove writepage implementation
If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent a2b9291 commit af34acc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

fs/ufs/inode.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <linux/string.h>
3636
#include <linux/mm.h>
3737
#include <linux/buffer_head.h>
38+
#include <linux/mpage.h>
3839
#include <linux/writeback.h>
3940
#include <linux/iversion.h>
4041

@@ -390,7 +391,7 @@ ufs_inode_getblock(struct inode *inode, u64 ind_block,
390391

391392
/**
392393
* 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
394395
*/
395396

396397
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
467468
return 0;
468469
}
469470

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)
471473
{
472-
return block_write_full_page(page,ufs_getfrag_block,wbc);
474+
return mpage_writepages(mapping, wbc, ufs_getfrag_block);
473475
}
474476

475477
static int ufs_read_folio(struct file *file, struct folio *folio)
@@ -528,9 +530,10 @@ const struct address_space_operations ufs_aops = {
528530
.dirty_folio = block_dirty_folio,
529531
.invalidate_folio = block_invalidate_folio,
530532
.read_folio = ufs_read_folio,
531-
.writepage = ufs_writepage,
533+
.writepages = ufs_writepages,
532534
.write_begin = ufs_write_begin,
533535
.write_end = ufs_write_end,
536+
.migrate_folio = buffer_migrate_folio,
534537
.bmap = ufs_bmap
535538
};
536539

0 commit comments

Comments
 (0)