diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-09 21:03:11 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-19 14:56:04 +0200 |
commit | 90cf500e338ab3f3c0f126ba37e36fb6a9058441 (patch) | |
tree | c5ec8f6df6a610d83ee63576849038f7aed434a4 /fs/nfs | |
parent | NFS: Don't refresh attributes with mounted-on-file information (diff) | |
download | linux-90cf500e338ab3f3c0f126ba37e36fb6a9058441.tar.xz linux-90cf500e338ab3f3c0f126ba37e36fb6a9058441.zip |
NFSv4: Fix return values for nfs4_file_open()
Currently, we are translating RPC level errors such as timeouts,
as well as interrupts etc into EOPENSTALE, which forces a single
replay of the open attempt. What we actually want to do is
force the replay only in the cases where the returned error
indicates that the file may have changed on the server.
So the fix is to spell out the exact set of errors where we want
to return EOPENSTALE.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4file.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 96db471ca2e5..339663d04bf8 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -73,13 +73,13 @@ nfs4_file_open(struct inode *inode, struct file *filp) if (IS_ERR(inode)) { err = PTR_ERR(inode); switch (err) { - case -EPERM: - case -EACCES: - case -EDQUOT: - case -ENOSPC: - case -EROFS: - goto out_put_ctx; default: + goto out_put_ctx; + case -ENOENT: + case -ESTALE: + case -EISDIR: + case -ENOTDIR: + case -ELOOP: goto out_drop; } } |