coda: Convert coda_symlink_filler() to use a folio

This is a straightforward conversion from the page APIs to the folio
APIs.  Symlinks are not allowed to be larger than PAGE_SIZE, so there
is little work to do here.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
parent ac09d88b
...@@ -22,25 +22,24 @@ ...@@ -22,25 +22,24 @@
static int coda_symlink_filler(struct file *file, struct folio *folio) static int coda_symlink_filler(struct file *file, struct folio *folio)
{ {
struct page *page = &folio->page;
struct inode *inode = folio->mapping->host; struct inode *inode = folio->mapping->host;
int error; int error;
struct coda_inode_info *cii; struct coda_inode_info *cii;
unsigned int len = PAGE_SIZE; unsigned int len = PAGE_SIZE;
char *p = page_address(page); char *p = folio_address(folio);
cii = ITOC(inode); cii = ITOC(inode);
error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len); error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len);
if (error) if (error)
goto fail; goto fail;
SetPageUptodate(page); folio_mark_uptodate(folio);
unlock_page(page); folio_unlock(folio);
return 0; return 0;
fail: fail:
SetPageError(page); folio_set_error(folio);
unlock_page(page); folio_unlock(folio);
return error; return error;
} }
......
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