diff mbox series

[5/6] ocfs2: use filemap_fdatawrite_wbc instead of generic_writepages

Message ID 20221229161031.391878-6-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/6] fs: remove an outdated comment on mpage_writepages | expand

Commit Message

Christoph Hellwig Dec. 29, 2022, 4:10 p.m. UTC
filemap_fdatawrite_wbc is a fairly thing wrapper around do_writepages,
and the big difference there is support for cgroup writeback, which
is not supported by ocfs2, and the potential to use ->writepages instead
of ->writepage, which ocfs2 does not currently implement but eventually
should.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/ocfs2/journal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Kara Jan. 2, 2023, 12:15 p.m. UTC | #1
On Thu 29-12-22 06:10:30, Christoph Hellwig wrote:
> filemap_fdatawrite_wbc is a fairly thing wrapper around do_writepages,
> and the big difference there is support for cgroup writeback, which
> is not supported by ocfs2, and the potential to use ->writepages instead
> of ->writepage, which ocfs2 does not currently implement but eventually
> should.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ocfs2/journal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index 59f612684c5178..25d8072ccfce46 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -852,7 +852,7 @@ static int ocfs2_journal_submit_inode_data_buffers(struct jbd2_inode *jinode)
>  		.range_end = jinode->i_dirty_end,
>  	};
>  
> -	return generic_writepages(mapping, &wbc);
> +	return filemap_fdatawrite_wbc(mapping, &wbc);
>  }
>  
>  int ocfs2_journal_init(struct ocfs2_super *osb, int *dirty)
> -- 
> 2.35.1
>
diff mbox series

Patch

diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 59f612684c5178..25d8072ccfce46 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -852,7 +852,7 @@  static int ocfs2_journal_submit_inode_data_buffers(struct jbd2_inode *jinode)
 		.range_end = jinode->i_dirty_end,
 	};
 
-	return generic_writepages(mapping, &wbc);
+	return filemap_fdatawrite_wbc(mapping, &wbc);
 }
 
 int ocfs2_journal_init(struct ocfs2_super *osb, int *dirty)