diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-05-30 22:20:57 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-05-31 12:31:40 +0200 |
commit | 4c59e914ef1a39d7a20d58723ceeff31e50e7292 (patch) | |
tree | 1badd5bd80c8f8eb17e75352e5fb1a1c6d68b275 | |
parent | efs: Convert efs_symlink_read_folio to use a folio (diff) | |
download | linux-4c59e914ef1a39d7a20d58723ceeff31e50e7292.tar.xz linux-4c59e914ef1a39d7a20d58723ceeff31e50e7292.zip |
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) <willy@infradead.org>
Link: https://lore.kernel.org/r/20240530202110.2653630-6-willy@infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | fs/hpfs/namei.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 9184b4584b01..d0edf9ed33b6 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -472,9 +472,8 @@ out: static int hpfs_symlink_read_folio(struct file *file, struct folio *folio) { - struct page *page = &folio->page; - char *link = page_address(page); - struct inode *i = page->mapping->host; + char *link = folio_address(folio); + struct inode *i = folio->mapping->host; struct fnode *fnode; struct buffer_head *bh; int err; @@ -485,17 +484,9 @@ static int hpfs_symlink_read_folio(struct file *file, struct folio *folio) goto fail; err = hpfs_read_ea(i->i_sb, fnode, "SYMLINK", link, PAGE_SIZE); brelse(bh); - if (err) - goto fail; - hpfs_unlock(i->i_sb); - SetPageUptodate(page); - unlock_page(page); - return 0; - fail: hpfs_unlock(i->i_sb); - SetPageError(page); - unlock_page(page); + folio_end_read(folio, err == 0); return err; } |