Skip to content

Commit 134d0b3

Browse files
sagigrimbergTrond Myklebust
authored andcommitted
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]>
1 parent 6cbe14f commit 134d0b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/symlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static int nfs_symlink_filler(struct file *file, struct folio *folio)
4141
error:
4242
folio_set_error(folio);
4343
folio_unlock(folio);
44-
return -EIO;
44+
return error;
4545
}
4646

4747
static const char *nfs_get_link(struct dentry *dentry,

0 commit comments

Comments
 (0)