Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 -55
-26
fs/gfs2/aops.c
··· 82 82 } 83 83 84 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 - 109 - /** 110 85 * gfs2_write_jdata_page - gfs2 jdata-specific version of block_write_full_page 111 86 * @page: The page to write 112 87 * @wbc: The writeback control ··· 740 765 } 741 766 742 767 static const struct address_space_operations gfs2_aops = { 743 - .writepage = gfs2_writepage, 744 768 .writepages = gfs2_writepages, 745 769 .read_folio = gfs2_read_folio, 746 770 .readahead = gfs2_readahead,
+2 -3
fs/gfs2/log.c
··· 131 131 if (!mapping) 132 132 continue; 133 133 spin_unlock(&sdp->sd_ail_lock); 134 - ret = generic_writepages(mapping, wbc); 134 + ret = filemap_fdatawrite_wbc(mapping, wbc); 135 135 if (need_resched()) { 136 136 blk_finish_plug(plug); 137 137 cond_resched(); ··· 222 222 spin_unlock(&sdp->sd_ail_lock); 223 223 blk_finish_plug(&plug); 224 224 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); 227 226 gfs2_withdraw(sdp); 228 227 } 229 228 trace_gfs2_ail_flush(sdp, wbc, 0);
-15
fs/iomap/buffered-io.c
··· 1529 1529 } 1530 1530 1531 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 - 1546 - int 1547 1532 iomap_writepages(struct address_space *mapping, struct writeback_control *wbc, 1548 1533 struct iomap_writepage_ctx *wpc, 1549 1534 const struct iomap_writeback_ops *ops)
-8
fs/zonefs/super.c
··· 231 231 .map_blocks = zonefs_write_map_blocks, 232 232 }; 233 233 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 - 241 234 static int zonefs_writepages(struct address_space *mapping, 242 235 struct writeback_control *wbc) 243 236 { ··· 258 265 static const struct address_space_operations zonefs_file_aops = { 259 266 .read_folio = zonefs_read_folio, 260 267 .readahead = zonefs_readahead, 261 - .writepage = zonefs_writepage, 262 268 .writepages = zonefs_writepages, 263 269 .dirty_folio = filemap_dirty_folio, 264 270 .release_folio = iomap_release_folio,
-3
include/linux/iomap.h
··· 297 297 void iomap_ioend_try_merge(struct iomap_ioend *ioend, 298 298 struct list_head *more_ioends); 299 299 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); 303 300 int iomap_writepages(struct address_space *mapping, 304 301 struct writeback_control *wbc, struct iomap_writepage_ctx *wpc, 305 302 const struct iomap_writeback_ops *ops);