summaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-05-30 21:20:54 +0100
committerChristian Brauner <brauner@kernel.org>2024-05-31 12:31:39 +0200
commit8c30a7344abedf25002baed6196cf41b6fb75c0e (patch)
tree7992201d0c246d7885580d40ceb8b5c5bc87711b /fs/coda
parent263cf578049708a115b3ca58e46b7e5d20763866 (diff)
downloadlinux-8c30a7344abedf25002baed6196cf41b6fb75c0e.tar.gz
linux-8c30a7344abedf25002baed6196cf41b6fb75c0e.tar.bz2
linux-8c30a7344abedf25002baed6196cf41b6fb75c0e.zip
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 <jaharkes@cs.cmu.edu> Cc: coda@cs.cmu.edu Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20240530202110.2653630-3-willy@infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/symlink.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/coda/symlink.c b/fs/coda/symlink.c
index ccdbec388091..40f84d014524 100644
--- a/fs/coda/symlink.c
+++ b/fs/coda/symlink.c
@@ -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;
}