summaryrefslogtreecommitdiff
path: root/libbcachefs/fs-io-buffered.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-08-26 16:48:18 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-08-27 18:47:54 -0400
commit90cbe3f3b4289abb39804bb0f7e78ad286e556fd (patch)
treefa8d131708938a2cb50f45295a0f5d3aa0ba0bc8 /libbcachefs/fs-io-buffered.c
parent4b97a99fa263096297816f64e45cac85d4fa8011 (diff)
Update bcachefs sources to 753b29cc7989 bcachefs: opts.data_allowed should be OPT_FORMAT
Diffstat (limited to 'libbcachefs/fs-io-buffered.c')
-rw-r--r--libbcachefs/fs-io-buffered.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libbcachefs/fs-io-buffered.c b/libbcachefs/fs-io-buffered.c
index fd8beb51..9532f1a7 100644
--- a/libbcachefs/fs-io-buffered.c
+++ b/libbcachefs/fs-io-buffered.c
@@ -667,6 +667,17 @@ do_io:
return 0;
}
+static int bch2_write_cache_pages(struct address_space *mapping,
+ struct writeback_control *wbc, void *data)
+{
+ struct folio *folio = NULL;
+ int error;
+
+ while ((folio = writeback_iter(mapping, wbc, folio, &error)))
+ error = __bch2_writepage(folio, wbc, data);
+ return error;
+}
+
int bch2_writepages(struct address_space *mapping, struct writeback_control *wbc)
{
struct bch_fs *c = mapping->host->i_sb->s_fs_info;
@@ -675,7 +686,7 @@ int bch2_writepages(struct address_space *mapping, struct writeback_control *wbc
bch2_inode_opts_get(&w->opts, c, &to_bch_ei(mapping->host)->ei_inode);
blk_start_plug(&w->plug);
- int ret = write_cache_pages(mapping, wbc, __bch2_writepage, w);
+ int ret = bch2_write_cache_pages(mapping, wbc, w);
if (w->io)
bch2_writepage_do_io(w);
blk_finish_plug(&w->plug);