Skip to content

Commit bfc7fbe

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
ocfs2: 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 1443a9f commit bfc7fbe

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

fs/ocfs2/aops.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -389,21 +389,18 @@ static void ocfs2_readahead(struct readahead_control *rac)
389389
/* Note: Because we don't support holes, our allocation has
390390
* already happened (allocation writes zeros to the file data)
391391
* so we don't have to worry about ordered writes in
392-
* ocfs2_writepage.
392+
* ocfs2_writepages.
393393
*
394-
* ->writepage is called during the process of invalidating the page cache
394+
* ->writepages is called during the process of invalidating the page cache
395395
* during blocked lock processing. It can't block on any cluster locks
396396
* to during block mapping. It's relying on the fact that the block
397397
* mapping can't have disappeared under the dirty pages that it is
398398
* being asked to write back.
399399
*/
400-
static int ocfs2_writepage(struct page *page, struct writeback_control *wbc)
400+
static int ocfs2_writepages(struct address_space *mapping,
401+
struct writeback_control *wbc)
401402
{
402-
trace_ocfs2_writepage(
403-
(unsigned long long)OCFS2_I(page->mapping->host)->ip_blkno,
404-
page->index);
405-
406-
return block_write_full_page(page, ocfs2_get_block, wbc);
403+
return mpage_writepages(mapping, wbc, ocfs2_get_block);
407404
}
408405

409406
/* Taken from ext3. We don't necessarily need the full blown
@@ -2471,7 +2468,7 @@ const struct address_space_operations ocfs2_aops = {
24712468
.dirty_folio = block_dirty_folio,
24722469
.read_folio = ocfs2_read_folio,
24732470
.readahead = ocfs2_readahead,
2474-
.writepage = ocfs2_writepage,
2471+
.writepages = ocfs2_writepages,
24752472
.write_begin = ocfs2_write_begin,
24762473
.write_end = ocfs2_write_end,
24772474
.bmap = ocfs2_bmap,

fs/ocfs2/ocfs2_trace.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,8 +1157,6 @@ DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_get_block_end);
11571157

11581158
DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_readpage);
11591159

1160-
DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_writepage);
1161-
11621160
DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_bmap);
11631161

11641162
TRACE_EVENT(ocfs2_try_to_write_inline_data,

0 commit comments

Comments
 (0)