Skip to content

Commit 12fc0a9

Browse files
Matthew Wilcox (Oracle)amschuma-ntap
authored andcommitted
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>
1 parent 1fd5394 commit 12fc0a9

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

fs/nfs/file.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ const struct address_space_operations nfs_file_aops = {
558558
.read_folio = nfs_read_folio,
559559
.readahead = nfs_readahead,
560560
.dirty_folio = filemap_dirty_folio,
561-
.writepage = nfs_writepage,
562561
.writepages = nfs_writepages,
563562
.write_begin = nfs_write_begin,
564563
.write_end = nfs_write_end,

fs/nfs/write.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -680,17 +680,6 @@ static int nfs_writepage_locked(struct folio *folio,
680680
return err;
681681
}
682682

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-
694683
static int nfs_writepages_callback(struct folio *folio,
695684
struct writeback_control *wbc, void *data)
696685
{

include/linux/nfs_fs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
595595
* linux/fs/nfs/write.c
596596
*/
597597
extern int nfs_congestion_kb;
598-
extern int nfs_writepage(struct page *page, struct writeback_control *wbc);
599598
extern int nfs_writepages(struct address_space *, struct writeback_control *);
600599
extern int nfs_flush_incompatible(struct file *file, struct folio *folio);
601600
extern int nfs_update_folio(struct file *file, struct folio *folio,

0 commit comments

Comments
 (0)