Commit 41a638a1 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Andrew Morton
Browse files

affs: convert affs_symlink_read_folio() to use the folio

Remove use of the old page APIs.  That includes use of setting PageError
on error; simply not setting the uptodate flag is sufficient.

Link: https://lkml.kernel.org/r/20230713035512.4139457-3-willy@infradead.org


Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: default avatarDavid Sterba <dsterba@suse.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.com>
Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Pankaj Raghav <p.raghav@samsung.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent b23d03ef
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -13,10 +13,9 @@

static int affs_symlink_read_folio(struct file *file, struct folio *folio)
{
	struct page *page = &folio->page;
	struct buffer_head *bh;
	struct inode *inode = page->mapping->host;
	char *link = page_address(page);
	struct inode *inode = folio->mapping->host;
	char *link = folio_address(folio);
	struct slink_front *lf;
	int			 i, j;
	char			 c;
@@ -58,12 +57,11 @@ static int affs_symlink_read_folio(struct file *file, struct folio *folio)
	}
	link[i] = '\0';
	affs_brelse(bh);
	SetPageUptodate(page);
	unlock_page(page);
	folio_mark_uptodate(folio);
	folio_unlock(folio);
	return 0;
fail:
	SetPageError(page);
	unlock_page(page);
	folio_unlock(folio);
	return -EIO;
}