Skip to content

Commit f27a8e2

Browse files
Matthew Wilcox (Oracle)aalexandrovich
authored andcommitted
ntfs3: Convert ntfs_read_folio to use a folio
Remove the struct page conversion, and use a folio throughout. We still convert back to a struct page for calling some internal functions, but those will change soon. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent b366809 commit f27a8e2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/ntfs3/inode.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -710,25 +710,24 @@ static sector_t ntfs_bmap(struct address_space *mapping, sector_t block)
710710

711711
static int ntfs_read_folio(struct file *file, struct folio *folio)
712712
{
713-
struct page *page = &folio->page;
714713
int err;
715-
struct address_space *mapping = page->mapping;
714+
struct address_space *mapping = folio->mapping;
716715
struct inode *inode = mapping->host;
717716
struct ntfs_inode *ni = ntfs_i(inode);
718717

719718
if (is_resident(ni)) {
720719
ni_lock(ni);
721-
err = attr_data_read_resident(ni, page);
720+
err = attr_data_read_resident(ni, &folio->page);
722721
ni_unlock(ni);
723722
if (err != E_NTFS_NONRESIDENT) {
724-
unlock_page(page);
723+
folio_unlock(folio);
725724
return err;
726725
}
727726
}
728727

729728
if (is_compressed(ni)) {
730729
ni_lock(ni);
731-
err = ni_readpage_cmpr(ni, page);
730+
err = ni_readpage_cmpr(ni, &folio->page);
732731
ni_unlock(ni);
733732
return err;
734733
}

0 commit comments

Comments
 (0)