mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
writeback: Remove writeback_use_writepage()
The ->writepage operation has been removed from all filesystems but shmem and swap, neither of which call in here. Remove this alternative to calling ->writepages. Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Link: https://lore.kernel.org/r/20250402150005.2309458-5-willy@infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
7ee3647243
commit
8e5ae388f3
@ -2621,27 +2621,6 @@ int write_cache_pages(struct address_space *mapping,
|
||||
}
|
||||
EXPORT_SYMBOL(write_cache_pages);
|
||||
|
||||
static int writeback_use_writepage(struct address_space *mapping,
|
||||
struct writeback_control *wbc)
|
||||
{
|
||||
struct folio *folio = NULL;
|
||||
struct blk_plug plug;
|
||||
int err;
|
||||
|
||||
blk_start_plug(&plug);
|
||||
while ((folio = writeback_iter(mapping, wbc, folio, &err))) {
|
||||
err = mapping->a_ops->writepage(&folio->page, wbc);
|
||||
if (err == AOP_WRITEPAGE_ACTIVATE) {
|
||||
folio_unlock(folio);
|
||||
err = 0;
|
||||
}
|
||||
mapping_set_error(mapping, err);
|
||||
}
|
||||
blk_finish_plug(&plug);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
|
||||
{
|
||||
int ret;
|
||||
@ -2652,14 +2631,11 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
|
||||
wb = inode_to_wb_wbc(mapping->host, wbc);
|
||||
wb_bandwidth_estimate_start(wb);
|
||||
while (1) {
|
||||
if (mapping->a_ops->writepages) {
|
||||
if (mapping->a_ops->writepages)
|
||||
ret = mapping->a_ops->writepages(mapping, wbc);
|
||||
} else if (mapping->a_ops->writepage) {
|
||||
ret = writeback_use_writepage(mapping, wbc);
|
||||
} else {
|
||||
else
|
||||
/* deal with chardevs and other special files */
|
||||
ret = 0;
|
||||
}
|
||||
if (ret != -ENOMEM || wbc->sync_mode != WB_SYNC_ALL)
|
||||
break;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user