Skip to content

Commit ebaad77

Browse files
Christoph Hellwigsmfrench
authored andcommitted
cifs: remove ->writepage
->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Now that cifs implements ->migrate_folio and doesn't call generic_writepages, the writepage method can be removed. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent bff9018 commit ebaad77

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

fs/cifs/file.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,13 +2868,6 @@ cifs_writepage_locked(struct page *page, struct writeback_control *wbc)
28682868
return rc;
28692869
}
28702870

2871-
static int cifs_writepage(struct page *page, struct writeback_control *wbc)
2872-
{
2873-
int rc = cifs_writepage_locked(page, wbc);
2874-
unlock_page(page);
2875-
return rc;
2876-
}
2877-
28782871
static int cifs_write_end(struct file *file, struct address_space *mapping,
28792872
loff_t pos, unsigned len, unsigned copied,
28802873
struct page *page, void *fsdata)
@@ -5247,7 +5240,6 @@ static bool cifs_dirty_folio(struct address_space *mapping, struct folio *folio)
52475240
const struct address_space_operations cifs_addr_ops = {
52485241
.read_folio = cifs_read_folio,
52495242
.readahead = cifs_readahead,
5250-
.writepage = cifs_writepage,
52515243
.writepages = cifs_writepages,
52525244
.write_begin = cifs_write_begin,
52535245
.write_end = cifs_write_end,
@@ -5272,7 +5264,6 @@ const struct address_space_operations cifs_addr_ops = {
52725264
*/
52735265
const struct address_space_operations cifs_addr_ops_smallbuf = {
52745266
.read_folio = cifs_read_folio,
5275-
.writepage = cifs_writepage,
52765267
.writepages = cifs_writepages,
52775268
.write_begin = cifs_write_begin,
52785269
.write_end = cifs_write_end,

0 commit comments

Comments
 (0)