summaryrefslogtreecommitdiff
path: root/fs/nfs/symlink.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-05-30 21:21:01 +0100
committerChristian Brauner <brauner@kernel.org>2024-05-31 12:31:41 +0200
commit8f3ab6e4bebe789f23690cf57fb1a648c4422b9d (patch)
tree4789710384ed481b1aa7882201c913e83985c3e1 /fs/nfs/symlink.c
parentd15b00b1e588ea88a747bd70f6e360870088f5d2 (diff)
nfs: Remove calls to folio_set_error
Common code doesn't test the error flag, so we don't need to set it in nfs. We can use folio_end_read() to combine the setting (or not) of the uptodate flag and clearing the lock flag. Cc: Trond Myklebust <trond.myklebust@hammerspace.com> Cc: Anna Schumaker <anna@kernel.org> Cc: linux-nfs@vger.kernel.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20240530202110.2653630-10-willy@infradead.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/nfs/symlink.c')
-rw-r--r--fs/nfs/symlink.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c
index 0e27a2e4e68b..1c62a5a9f51d 100644
--- a/fs/nfs/symlink.c
+++ b/fs/nfs/symlink.c
@@ -32,16 +32,8 @@ static int nfs_symlink_filler(struct file *file, struct folio *folio)
int error;
error = NFS_PROTO(inode)->readlink(inode, &folio->page, 0, PAGE_SIZE);
- if (error < 0)
- goto error;
- folio_mark_uptodate(folio);
- folio_unlock(folio);
- return 0;
-
-error:
- folio_set_error(folio);
- folio_unlock(folio);
- return -EIO;
+ folio_end_read(folio, error == 0);
+ return error;
}
static const char *nfs_get_link(struct dentry *dentry,