]> git.baikalelectronics.ru Git - kernel.git/commitdiff
coda: Convert coda_symlink_filler() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 29 Apr 2022 15:12:16 +0000 (11:12 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 2 Aug 2022 16:34:03 +0000 (12:34 -0400)
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: Matthew Wilcox (Oracle) <willy@infradead.org>
fs/coda/symlink.c

index 8adf810424986b1601e9ac1830d4a6a7dc49043e..ccdbec388091abb9c637027cd12aa4dcddf75164 100644 (file)
 
 static int coda_symlink_filler(struct file *file, struct folio *folio)
 {
-       struct page *page = &folio->page;
        struct inode *inode = folio->mapping->host;
        int error;
        struct coda_inode_info *cii;
        unsigned int len = PAGE_SIZE;
-       char *p = page_address(page);
+       char *p = folio_address(folio);
 
        cii = ITOC(inode);
 
        error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len);
        if (error)
                goto fail;
-       SetPageUptodate(page);
-       unlock_page(page);
+       folio_mark_uptodate(folio);
+       folio_unlock(folio);
        return 0;
 
 fail:
-       SetPageError(page);
-       unlock_page(page);
+       folio_set_error(folio);
+       folio_unlock(folio);
        return error;
 }