Skip to content

Commit 2bf06b8

Browse files
author
Matthew Wilcox (Oracle)
committed
fuse: Convert from launder_page to launder_folio
Straightforward conversion although the helper functions still assume a single page. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Tested-by: Damien Le Moal <[email protected]> Acked-by: Damien Le Moal <[email protected]> Tested-by: Mike Marshall <[email protected]> # orangefs Tested-by: David Howells <[email protected]> # afs
1 parent ff2b48b commit 2bf06b8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

fs/fuse/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ int fuse_do_setattr(struct dentry *dentry, struct iattr *attr,
17731773

17741774
/*
17751775
* Only call invalidate_inode_pages2() after removing
1776-
* FUSE_NOWRITE, otherwise fuse_launder_page() would deadlock.
1776+
* FUSE_NOWRITE, otherwise fuse_launder_folio() would deadlock.
17771777
*/
17781778
if ((is_truncate || !is_wb) &&
17791779
S_ISREG(inode->i_mode) && oldsize != outarg.attr.size) {

fs/fuse/file.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,17 +2330,17 @@ static int fuse_write_end(struct file *file, struct address_space *mapping,
23302330
return copied;
23312331
}
23322332

2333-
static int fuse_launder_page(struct page *page)
2333+
static int fuse_launder_folio(struct folio *folio)
23342334
{
23352335
int err = 0;
2336-
if (clear_page_dirty_for_io(page)) {
2337-
struct inode *inode = page->mapping->host;
2336+
if (folio_clear_dirty_for_io(folio)) {
2337+
struct inode *inode = folio->mapping->host;
23382338

23392339
/* Serialize with pending writeback for the same page */
2340-
fuse_wait_on_page_writeback(inode, page->index);
2341-
err = fuse_writepage_locked(page);
2340+
fuse_wait_on_page_writeback(inode, folio->index);
2341+
err = fuse_writepage_locked(&folio->page);
23422342
if (!err)
2343-
fuse_wait_on_page_writeback(inode, page->index);
2343+
fuse_wait_on_page_writeback(inode, folio->index);
23442344
}
23452345
return err;
23462346
}
@@ -3161,7 +3161,7 @@ static const struct address_space_operations fuse_file_aops = {
31613161
.readahead = fuse_readahead,
31623162
.writepage = fuse_writepage,
31633163
.writepages = fuse_writepages,
3164-
.launder_page = fuse_launder_page,
3164+
.launder_folio = fuse_launder_folio,
31653165
.set_page_dirty = __set_page_dirty_nobuffers,
31663166
.bmap = fuse_bmap,
31673167
.direct_IO = fuse_direct_IO,

0 commit comments

Comments
 (0)