aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2014-01-29 11:34:38 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-01-29 11:54:55 -0500
commitf9c96fcc501a43dbc292b17fc0ded4b54e63b79d (patch)
tree50feb8393e5fa42095511a1417dbe56def085569 /fs/nfs/nfs4filelayout.c
parent4db72b40fdbc706f8957e9773ae73b1574b8c694 (diff)
NFSv4.1 free slot before resending I/O to MDS
Fix a dynamic session slot leak where a slot is preallocated and I/O is resent through the MDS. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 03fd8be8c0c5..20a56fa271bd 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -335,8 +335,11 @@ static void filelayout_read_call_done(struct rpc_task *task, void *data)
335 dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status); 335 dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status);
336 336
337 if (test_bit(NFS_IOHDR_REDO, &rdata->header->flags) && 337 if (test_bit(NFS_IOHDR_REDO, &rdata->header->flags) &&
338 task->tk_status == 0) 338 task->tk_status == 0) {
339 if (rdata->res.seq_res.sr_slot != NULL)
340 nfs41_sequence_done(task, &rdata->res.seq_res);
339 return; 341 return;
342 }
340 343
341 /* Note this may cause RPC to be resent */ 344 /* Note this may cause RPC to be resent */
342 rdata->header->mds_ops->rpc_call_done(task, data); 345 rdata->header->mds_ops->rpc_call_done(task, data);
@@ -442,8 +445,11 @@ static void filelayout_write_call_done(struct rpc_task *task, void *data)
442 struct nfs_write_data *wdata = data; 445 struct nfs_write_data *wdata = data;
443 446
444 if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags) && 447 if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags) &&
445 task->tk_status == 0) 448 task->tk_status == 0) {
449 if (wdata->res.seq_res.sr_slot != NULL)
450 nfs41_sequence_done(task, &wdata->res.seq_res);
446 return; 451 return;
452 }
447 453
448 /* Note this may cause RPC to be resent */ 454 /* Note this may cause RPC to be resent */
449 wdata->header->mds_ops->rpc_call_done(task, data); 455 wdata->header->mds_ops->rpc_call_done(task, data);