Skip to content

Commit a2b9291

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
sysv: 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: Jens Axboe <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent bfc7fbe commit a2b9291

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

fs/sysv/itree.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <linux/buffer_head.h>
1010
#include <linux/mount.h>
11+
#include <linux/mpage.h>
1112
#include <linux/string.h>
1213
#include "sysv.h"
1314

@@ -456,9 +457,10 @@ int sysv_getattr(struct mnt_idmap *idmap, const struct path *path,
456457
return 0;
457458
}
458459

459-
static int sysv_writepage(struct page *page, struct writeback_control *wbc)
460+
static int sysv_writepages(struct address_space *mapping,
461+
struct writeback_control *wbc)
460462
{
461-
return block_write_full_page(page,get_block,wbc);
463+
return mpage_writepages(mapping, wbc, get_block);
462464
}
463465

464466
static int sysv_read_folio(struct file *file, struct folio *folio)
@@ -503,8 +505,9 @@ const struct address_space_operations sysv_aops = {
503505
.dirty_folio = block_dirty_folio,
504506
.invalidate_folio = block_invalidate_folio,
505507
.read_folio = sysv_read_folio,
506-
.writepage = sysv_writepage,
508+
.writepages = sysv_writepages,
507509
.write_begin = sysv_write_begin,
508510
.write_end = generic_write_end,
511+
.migrate_folio = buffer_migrate_folio,
509512
.bmap = sysv_bmap
510513
};

0 commit comments

Comments
 (0)