Skip to content

Commit 4c59e91

Browse files
Matthew Wilcox (Oracle)brauner
authored andcommitted
hpfs: Convert hpfs_symlink_read_folio to use a folio
Remove the conversion back into a page and use the folio APIs throughout. Remove the setting of PG_error instead of converting it; it is unused by core code or by the rest of HPFS, so it serves no purpose here. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 09da047 commit 4c59e91

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

fs/hpfs/namei.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,8 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
472472

473473
static int hpfs_symlink_read_folio(struct file *file, struct folio *folio)
474474
{
475-
struct page *page = &folio->page;
476-
char *link = page_address(page);
477-
struct inode *i = page->mapping->host;
475+
char *link = folio_address(folio);
476+
struct inode *i = folio->mapping->host;
478477
struct fnode *fnode;
479478
struct buffer_head *bh;
480479
int err;
@@ -485,17 +484,9 @@ static int hpfs_symlink_read_folio(struct file *file, struct folio *folio)
485484
goto fail;
486485
err = hpfs_read_ea(i->i_sb, fnode, "SYMLINK", link, PAGE_SIZE);
487486
brelse(bh);
488-
if (err)
489-
goto fail;
490-
hpfs_unlock(i->i_sb);
491-
SetPageUptodate(page);
492-
unlock_page(page);
493-
return 0;
494-
495487
fail:
496488
hpfs_unlock(i->i_sb);
497-
SetPageError(page);
498-
unlock_page(page);
489+
folio_end_read(folio, err == 0);
499490
return err;
500491
}
501492

0 commit comments

Comments
 (0)