mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									1fd5394e6a
								
							
						
					
					
						commit
						12fc0a9631
					
				
					 3 changed files with 0 additions and 13 deletions
				
			
		| 
						 | 
					@ -558,7 +558,6 @@ const struct address_space_operations nfs_file_aops = {
 | 
				
			||||||
	.read_folio = nfs_read_folio,
 | 
						.read_folio = nfs_read_folio,
 | 
				
			||||||
	.readahead = nfs_readahead,
 | 
						.readahead = nfs_readahead,
 | 
				
			||||||
	.dirty_folio = filemap_dirty_folio,
 | 
						.dirty_folio = filemap_dirty_folio,
 | 
				
			||||||
	.writepage = nfs_writepage,
 | 
					 | 
				
			||||||
	.writepages = nfs_writepages,
 | 
						.writepages = nfs_writepages,
 | 
				
			||||||
	.write_begin = nfs_write_begin,
 | 
						.write_begin = nfs_write_begin,
 | 
				
			||||||
	.write_end = nfs_write_end,
 | 
						.write_end = nfs_write_end,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -680,17 +680,6 @@ static int nfs_writepage_locked(struct folio *folio,
 | 
				
			||||||
	return err;
 | 
						return err;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int nfs_writepage(struct page *page, struct writeback_control *wbc)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct folio *folio = page_folio(page);
 | 
					 | 
				
			||||||
	int ret;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ret = nfs_writepage_locked(folio, wbc);
 | 
					 | 
				
			||||||
	if (ret != AOP_WRITEPAGE_ACTIVATE)
 | 
					 | 
				
			||||||
		unlock_page(page);
 | 
					 | 
				
			||||||
	return ret;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int nfs_writepages_callback(struct folio *folio,
 | 
					static int nfs_writepages_callback(struct folio *folio,
 | 
				
			||||||
				   struct writeback_control *wbc, void *data)
 | 
									   struct writeback_control *wbc, void *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -595,7 +595,6 @@ extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
 | 
				
			||||||
 * linux/fs/nfs/write.c
 | 
					 * linux/fs/nfs/write.c
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
extern int  nfs_congestion_kb;
 | 
					extern int  nfs_congestion_kb;
 | 
				
			||||||
extern int  nfs_writepage(struct page *page, struct writeback_control *wbc);
 | 
					 | 
				
			||||||
extern int  nfs_writepages(struct address_space *, struct writeback_control *);
 | 
					extern int  nfs_writepages(struct address_space *, struct writeback_control *);
 | 
				
			||||||
extern int  nfs_flush_incompatible(struct file *file, struct folio *folio);
 | 
					extern int  nfs_flush_incompatible(struct file *file, struct folio *folio);
 | 
				
			||||||
extern int  nfs_update_folio(struct file *file, struct folio *folio,
 | 
					extern int  nfs_update_folio(struct file *file, struct folio *folio,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue