mirror of https://github.com/torvalds/linux.git
efs: Convert efs_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 EFS, so it serves no purpose here. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20240530202110.2653630-5-willy@infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
def27a2054
commit
09da047e55
|
|
@ -14,10 +14,9 @@
|
||||||
|
|
||||||
static int efs_symlink_read_folio(struct file *file, struct folio *folio)
|
static int efs_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 buffer_head *bh;
|
||||||
struct buffer_head * bh;
|
struct inode *inode = folio->mapping->host;
|
||||||
struct inode * inode = page->mapping->host;
|
|
||||||
efs_block_t size = inode->i_size;
|
efs_block_t size = inode->i_size;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|
@ -40,12 +39,9 @@ static int efs_symlink_read_folio(struct file *file, struct folio *folio)
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
}
|
}
|
||||||
link[size] = '\0';
|
link[size] = '\0';
|
||||||
SetPageUptodate(page);
|
err = 0;
|
||||||
unlock_page(page);
|
|
||||||
return 0;
|
|
||||||
fail:
|
fail:
|
||||||
SetPageError(page);
|
folio_end_read(folio, err == 0);
|
||||||
unlock_page(page);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue