summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-01-22 11:56:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2023-01-22 11:56:33 -0800
commit3c006ad74d68be45ee36ca68fd9c053974fb6b0f (patch)
treea117cd264b77cedb384e7c910e3384cc2f717d20 /fs
parent2241ab53cbb5cdb08a6b2d4688feb13971058f65 (diff)
parent95ecbd0f162fc06ef4c4045a66f653f47b62a2d3 (diff)
downloadlinux-rpi-3c006ad74d68be45ee36ca68fd9c053974fb6b0f.tar.gz
linux-rpi-3c006ad74d68be45ee36ca68fd9c053974fb6b0f.tar.bz2
linux-rpi-3c006ad74d68be45ee36ca68fd9c053974fb6b0f.zip
Merge tag 'gfs2-v6.2-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 writepage fix from Andreas Gruenbacher: - Fix a regression introduced by commit "gfs2: stop using generic_writepages in gfs2_ail1_start_one". * tag 'gfs2-v6.2-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: Revert "gfs2: stop using generic_writepages in gfs2_ail1_start_one"
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/log.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 723639376ae2..61323deb80bc 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -80,6 +80,15 @@ void gfs2_remove_from_ail(struct gfs2_bufdata *bd)
brelse(bd->bd_bh);
}
+static int __gfs2_writepage(struct page *page, struct writeback_control *wbc,
+ void *data)
+{
+ struct address_space *mapping = data;
+ int ret = mapping->a_ops->writepage(page, wbc);
+ mapping_set_error(mapping, ret);
+ return ret;
+}
+
/**
* gfs2_ail1_start_one - Start I/O on a transaction
* @sdp: The superblock
@@ -131,7 +140,7 @@ __acquires(&sdp->sd_ail_lock)
if (!mapping)
continue;
spin_unlock(&sdp->sd_ail_lock);
- ret = filemap_fdatawrite_wbc(mapping, wbc);
+ ret = write_cache_pages(mapping, wbc, __gfs2_writepage, mapping);
if (need_resched()) {
blk_finish_plug(plug);
cond_resched();