diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 16:04:13 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 16:04:13 -0500 |
commit | 027b6ca02192f381a5a91237ba8a8cf625dc6f6a (patch) | |
tree | f8ece785b53cbb8978bab734e348972aa5ed022f /fs/nfs/nfs4proc.c | |
parent | 6dcd3926b214a1fb081df18305921dedae269977 (diff) |
NFSv4: Fix an infinite loop in the NFS state recovery code
Marten Gajda <marten.gajda@fernuni-hagen.de> states:
I tracked the problem down to the function nfs4_do_open_expired.
Within this function _nfs4_open_expired is called and may return
-NFS4ERR_DELAY. When a further call to _nfs4_open_expired is
executed and does not return -NFS4ERR_DELAY the "exception.retry"
variable is not reset to 0, causing the loop to iterate again
(and as long as err != -NFS4ERR_DELAY, probably forever)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e8df52dc2bc5..49eebe25bbad 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1104,8 +1104,9 @@ static inline int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4 | |||
1104 | 1104 | ||
1105 | do { | 1105 | do { |
1106 | err = _nfs4_open_expired(ctx, state); | 1106 | err = _nfs4_open_expired(ctx, state); |
1107 | if (err == -NFS4ERR_DELAY) | 1107 | if (err != -NFS4ERR_DELAY) |
1108 | nfs4_handle_exception(server, err, &exception); | 1108 | break; |
1109 | nfs4_handle_exception(server, err, &exception); | ||
1109 | } while (exception.retry); | 1110 | } while (exception.retry); |
1110 | return err; | 1111 | return err; |
1111 | } | 1112 | } |