diff options
author | Sagi Grimberg <[email protected]> | 2024-05-21 15:58:40 +0300 |
---|---|---|
committer | Trond Myklebust <[email protected]> | 2024-05-22 19:25:00 -0400 |
commit | 134d0b3f2440cdddd12fc3444c9c0f62331ce6fc (patch) | |
tree | 7312f1ce7a569b4f7b18b5debc6f4d2c01bf24b2 | |
parent | 6cbe14f42be3b596e9590d48e12436982ba26e4b (diff) |
nfs: propagate readlink errors in nfs_symlink_filler
There is an inherent race where a symlink file may have been overriden
(by a different client) between lookup and readlink, resulting in a
spurious EIO error returned to userspace. Fix this by propagating back
ESTALE errors such that the vfs will retry the lookup/get_link (similar
to nfs4_file_open) at least once.
Cc: Dan Aloni <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
-rw-r--r-- | fs/nfs/symlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c index 0e27a2e4e68b..13818129d268 100644 --- a/fs/nfs/symlink.c +++ b/fs/nfs/symlink.c @@ -41,7 +41,7 @@ static int nfs_symlink_filler(struct file *file, struct folio *folio) error: folio_set_error(folio); folio_unlock(folio); - return -EIO; + return error; } static const char *nfs_get_link(struct dentry *dentry, |