Skip to content

Commit 8745889

Browse files
committed
Merge tag 'iomap-6.0-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull more iomap updates from Darrick Wong: "In the past 10 days or so I've not heard any ZOMG STOP style complaints about removing ->writepage support from gfs2 or zonefs, so here's the pull request removing them (and the underlying fs iomap support) from the kernel: - Remove iomap_writepage and all callers, since the mm apparently never called the zonefs or gfs2 writepage functions" * tag 'iomap-6.0-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: remove iomap_writepage zonefs: remove ->writepage gfs2: remove ->writepage gfs2: stop using generic_writepages in gfs2_ail1_start_one
2 parents 786da5d + 478af19 commit 8745889

5 files changed

Lines changed: 2 additions & 55 deletions

File tree

fs/gfs2/aops.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,31 +81,6 @@ static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock,
8181
return 0;
8282
}
8383

84-
/**
85-
* gfs2_writepage - Write page for writeback mappings
86-
* @page: The page
87-
* @wbc: The writeback control
88-
*/
89-
static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
90-
{
91-
struct inode *inode = page->mapping->host;
92-
struct gfs2_inode *ip = GFS2_I(inode);
93-
struct gfs2_sbd *sdp = GFS2_SB(inode);
94-
struct iomap_writepage_ctx wpc = { };
95-
96-
if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
97-
goto out;
98-
if (current->journal_info)
99-
goto redirty;
100-
return iomap_writepage(page, wbc, &wpc, &gfs2_writeback_ops);
101-
102-
redirty:
103-
redirty_page_for_writepage(wbc, page);
104-
out:
105-
unlock_page(page);
106-
return 0;
107-
}
108-
10984
/**
11085
* gfs2_write_jdata_page - gfs2 jdata-specific version of block_write_full_page
11186
* @page: The page to write
@@ -765,7 +740,6 @@ bool gfs2_release_folio(struct folio *folio, gfp_t gfp_mask)
765740
}
766741

767742
static const struct address_space_operations gfs2_aops = {
768-
.writepage = gfs2_writepage,
769743
.writepages = gfs2_writepages,
770744
.read_folio = gfs2_read_folio,
771745
.readahead = gfs2_readahead,

fs/gfs2/log.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ __acquires(&sdp->sd_ail_lock)
131131
if (!mapping)
132132
continue;
133133
spin_unlock(&sdp->sd_ail_lock);
134-
ret = generic_writepages(mapping, wbc);
134+
ret = filemap_fdatawrite_wbc(mapping, wbc);
135135
if (need_resched()) {
136136
blk_finish_plug(plug);
137137
cond_resched();
@@ -222,8 +222,7 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc)
222222
spin_unlock(&sdp->sd_ail_lock);
223223
blk_finish_plug(&plug);
224224
if (ret) {
225-
gfs2_lm(sdp, "gfs2_ail1_start_one (generic_writepages) "
226-
"returned: %d\n", ret);
225+
gfs2_lm(sdp, "gfs2_ail1_start_one returned: %d\n", ret);
227226
gfs2_withdraw(sdp);
228227
}
229228
trace_gfs2_ail_flush(sdp, wbc, 0);

fs/iomap/buffered-io.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,21 +1528,6 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
15281528
return 0;
15291529
}
15301530

1531-
int
1532-
iomap_writepage(struct page *page, struct writeback_control *wbc,
1533-
struct iomap_writepage_ctx *wpc,
1534-
const struct iomap_writeback_ops *ops)
1535-
{
1536-
int ret;
1537-
1538-
wpc->ops = ops;
1539-
ret = iomap_do_writepage(page, wbc, wpc);
1540-
if (!wpc->ioend)
1541-
return ret;
1542-
return iomap_submit_ioend(wpc, wpc->ioend, ret);
1543-
}
1544-
EXPORT_SYMBOL_GPL(iomap_writepage);
1545-
15461531
int
15471532
iomap_writepages(struct address_space *mapping, struct writeback_control *wbc,
15481533
struct iomap_writepage_ctx *wpc,

fs/zonefs/super.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,6 @@ static const struct iomap_writeback_ops zonefs_writeback_ops = {
231231
.map_blocks = zonefs_write_map_blocks,
232232
};
233233

234-
static int zonefs_writepage(struct page *page, struct writeback_control *wbc)
235-
{
236-
struct iomap_writepage_ctx wpc = { };
237-
238-
return iomap_writepage(page, wbc, &wpc, &zonefs_writeback_ops);
239-
}
240-
241234
static int zonefs_writepages(struct address_space *mapping,
242235
struct writeback_control *wbc)
243236
{
@@ -265,7 +258,6 @@ static int zonefs_swap_activate(struct swap_info_struct *sis,
265258
static const struct address_space_operations zonefs_file_aops = {
266259
.read_folio = zonefs_read_folio,
267260
.readahead = zonefs_readahead,
268-
.writepage = zonefs_writepage,
269261
.writepages = zonefs_writepages,
270262
.dirty_folio = filemap_dirty_folio,
271263
.release_folio = iomap_release_folio,

include/linux/iomap.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,6 @@ void iomap_finish_ioends(struct iomap_ioend *ioend, int error);
297297
void iomap_ioend_try_merge(struct iomap_ioend *ioend,
298298
struct list_head *more_ioends);
299299
void iomap_sort_ioends(struct list_head *ioend_list);
300-
int iomap_writepage(struct page *page, struct writeback_control *wbc,
301-
struct iomap_writepage_ctx *wpc,
302-
const struct iomap_writeback_ops *ops);
303300
int iomap_writepages(struct address_space *mapping,
304301
struct writeback_control *wbc, struct iomap_writepage_ctx *wpc,
305302
const struct iomap_writeback_ops *ops);

0 commit comments

Comments
 (0)