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

nfs: Remove writepage

NFS already has writepages and migrate_folio, so it does not need to
implement writepage. The writepage operation is deprecated as it leads
to worse performance under high memory pressure due to folios being
written out in LRU order rather than sequentially within a file.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>

authored by

Matthew Wilcox (Oracle) and committed by
Anna Schumaker
12fc0a96 1fd5394e

-13
-1
fs/nfs/file.c
··· 558 558 .read_folio = nfs_read_folio, 559 559 .readahead = nfs_readahead, 560 560 .dirty_folio = filemap_dirty_folio, 561 - .writepage = nfs_writepage, 562 561 .writepages = nfs_writepages, 563 562 .write_begin = nfs_write_begin, 564 563 .write_end = nfs_write_end,
-11
fs/nfs/write.c
··· 680 680 return err; 681 681 } 682 682 683 - int nfs_writepage(struct page *page, struct writeback_control *wbc) 684 - { 685 - struct folio *folio = page_folio(page); 686 - int ret; 687 - 688 - ret = nfs_writepage_locked(folio, wbc); 689 - if (ret != AOP_WRITEPAGE_ACTIVATE) 690 - unlock_page(page); 691 - return ret; 692 - } 693 - 694 683 static int nfs_writepages_callback(struct folio *folio, 695 684 struct writeback_control *wbc, void *data) 696 685 {
-1
include/linux/nfs_fs.h
··· 595 595 * linux/fs/nfs/write.c 596 596 */ 597 597 extern int nfs_congestion_kb; 598 - extern int nfs_writepage(struct page *page, struct writeback_control *wbc); 599 598 extern int nfs_writepages(struct address_space *, struct writeback_control *); 600 599 extern int nfs_flush_incompatible(struct file *file, struct folio *folio); 601 600 extern int nfs_update_folio(struct file *file, struct folio *folio,