Skip to content

Commit 3c006ad

Browse files
committed
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"
2 parents 2241ab5 + 95ecbd0 commit 3c006ad

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

fs/gfs2/log.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ void gfs2_remove_from_ail(struct gfs2_bufdata *bd)
8080
brelse(bd->bd_bh);
8181
}
8282

83+
static int __gfs2_writepage(struct page *page, struct writeback_control *wbc,
84+
void *data)
85+
{
86+
struct address_space *mapping = data;
87+
int ret = mapping->a_ops->writepage(page, wbc);
88+
mapping_set_error(mapping, ret);
89+
return ret;
90+
}
91+
8392
/**
8493
* gfs2_ail1_start_one - Start I/O on a transaction
8594
* @sdp: The superblock
@@ -131,7 +140,7 @@ __acquires(&sdp->sd_ail_lock)
131140
if (!mapping)
132141
continue;
133142
spin_unlock(&sdp->sd_ail_lock);
134-
ret = filemap_fdatawrite_wbc(mapping, wbc);
143+
ret = write_cache_pages(mapping, wbc, __gfs2_writepage, mapping);
135144
if (need_resched()) {
136145
blk_finish_plug(plug);
137146
cond_resched();

0 commit comments

Comments
 (0)