Commit 4c59e914 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Christian Brauner

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: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20240530202110.2653630-6-willy@infradead.orgSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 09da047e
...@@ -472,9 +472,8 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -472,9 +472,8 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry)
static int hpfs_symlink_read_folio(struct file *file, struct folio *folio) static int hpfs_symlink_read_folio(struct file *file, struct folio *folio)
{ {
struct page *page = &folio->page; char *link = folio_address(folio);
char *link = page_address(page); struct inode *i = folio->mapping->host;
struct inode *i = page->mapping->host;
struct fnode *fnode; struct fnode *fnode;
struct buffer_head *bh; struct buffer_head *bh;
int err; int err;
...@@ -485,17 +484,9 @@ static int hpfs_symlink_read_folio(struct file *file, struct folio *folio) ...@@ -485,17 +484,9 @@ static int hpfs_symlink_read_folio(struct file *file, struct folio *folio)
goto fail; goto fail;
err = hpfs_read_ea(i->i_sb, fnode, "SYMLINK", link, PAGE_SIZE); err = hpfs_read_ea(i->i_sb, fnode, "SYMLINK", link, PAGE_SIZE);
brelse(bh); brelse(bh);
if (err)
goto fail;
hpfs_unlock(i->i_sb);
SetPageUptodate(page);
unlock_page(page);
return 0;
fail: fail:
hpfs_unlock(i->i_sb); hpfs_unlock(i->i_sb);
SetPageError(page); folio_end_read(folio, err == 0);
unlock_page(page);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment