aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-12-04 15:55:29 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-12-04 15:55:29 -0500
commite608e79f1bf4b967afcf57777e63b5f0939b00e8 (patch)
treed649b5714435b7d2d4edd5779fa22122d61ee0c5 /fs/nfs/read.c
parent1d9ddde94aed01c4618cf6f70883cc511c3b2b62 (diff)
nfs41: call free slot from nfs4_restart_rpc
nfs41_sequence_free_slot can be called multiple times on SEQUENCE operation errors. No reason to inline nfs4_restart_rpc Reported-by: Trond Myklebust <trond.myklebust@netapp.com> nfs_writeback_done and nfs_readpage_retry call nfs4_restart_rpc outside the error handler, and the slot is not freed prior to restarting in the rpc_prepare state during session reset. Fix this by moving the call to nfs41_sequence_free_slot from the error path of nfs41_sequence_done into nfs4_restart_rpc, and by removing the test for NFS4CLNT_SESSION_SETUP. Always free slot and goto the rpc prepare state on async errors. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 12c9e66d3f1..3e04fb9ea64 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -368,7 +368,8 @@ static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data
argp->offset += resp->count;
argp->pgbase += resp->count;
argp->count -= resp->count;
- nfs4_restart_rpc(task, NFS_SERVER(data->inode)->nfs_client);
+ nfs4_restart_rpc(task, NFS_SERVER(data->inode)->nfs_client,
+ &data->res.seq_res);
return;
out:
nfs4_sequence_free_slot(NFS_SERVER(data->inode)->nfs_client,