mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
coda: Convert coda_symlink_filler() to use folio_end_read()
This is slightly more efficient than separate calls to folio_mark_uptodate() and folio_unlock(), and it's easier to read. Get rid of the call to folio_set_error() as nobody will check this flag. Cc: Jan Harkes <[email protected]> Cc: [email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
This commit is contained in:
1 parent
263cf57804
commit
8c30a7344a
1 file changed
+1
-9
+1
-9
@@ -31,15 +31,7 @@ static int coda_symlink_filler(struct file *file, struct folio *folio)
|
||||
cii = ITOC(inode);
|
||||
|
||||
error = venus_readlink(inode->i_sb, &cii->c_fid, p, &len);
|
||||
if (error)
|
||||
goto fail;
|
||||
folio_mark_uptodate(folio);
|
||||
folio_unlock(folio);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
folio_set_error(folio);
|
||||
folio_unlock(folio);
|
||||
folio_end_read(folio, error == 0);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user