aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-10-22 20:07:20 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-12-05 18:30:48 -0500
commit6ba7db3420c0dbf3ede16f19a593e6a80edc043f (patch)
treeda9307099e01d13558eff4dab39a16ca728ae297 /fs/nfs/nfs4proc.c
parentc10e449827e6008ef5a4a71c0247c7eb73948e1b (diff)
NFSv4.1: Use nfs41_setup_sequence where appropriate
There is no point in using nfs4_setup_sequence or nfs4_sequence_done in pure NFSv4.1 functions. We already know that those have sessions... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ecd4ed3a4f65..39d24158f97f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -597,10 +597,11 @@ struct nfs41_call_sync_data {
597static void nfs41_call_sync_prepare(struct rpc_task *task, void *calldata) 597static void nfs41_call_sync_prepare(struct rpc_task *task, void *calldata)
598{ 598{
599 struct nfs41_call_sync_data *data = calldata; 599 struct nfs41_call_sync_data *data = calldata;
600 struct nfs4_session *session = nfs4_get_session(data->seq_server);
600 601
601 dprintk("--> %s data->seq_server %p\n", __func__, data->seq_server); 602 dprintk("--> %s data->seq_server %p\n", __func__, data->seq_server);
602 603
603 if (nfs4_setup_sequence(data->seq_server, data->seq_args, 604 if (nfs41_setup_sequence(session, data->seq_args,
604 data->seq_res, task)) 605 data->seq_res, task))
605 return; 606 return;
606 rpc_call_start(task); 607 rpc_call_start(task);
@@ -6018,6 +6019,7 @@ nfs4_layoutget_prepare(struct rpc_task *task, void *calldata)
6018{ 6019{
6019 struct nfs4_layoutget *lgp = calldata; 6020 struct nfs4_layoutget *lgp = calldata;
6020 struct nfs_server *server = NFS_SERVER(lgp->args.inode); 6021 struct nfs_server *server = NFS_SERVER(lgp->args.inode);
6022 struct nfs4_session *session = nfs4_get_session(server);
6021 6023
6022 dprintk("--> %s\n", __func__); 6024 dprintk("--> %s\n", __func__);
6023 /* Note the is a race here, where a CB_LAYOUTRECALL can come in 6025 /* Note the is a race here, where a CB_LAYOUTRECALL can come in
@@ -6025,7 +6027,7 @@ nfs4_layoutget_prepare(struct rpc_task *task, void *calldata)
6025 * However, that is not so catastrophic, and there seems 6027 * However, that is not so catastrophic, and there seems
6026 * to be no way to prevent it completely. 6028 * to be no way to prevent it completely.
6027 */ 6029 */
6028 if (nfs4_setup_sequence(server, &lgp->args.seq_args, 6030 if (nfs41_setup_sequence(session, &lgp->args.seq_args,
6029 &lgp->res.seq_res, task)) 6031 &lgp->res.seq_res, task))
6030 return; 6032 return;
6031 if (pnfs_choose_layoutget_stateid(&lgp->args.stateid, 6033 if (pnfs_choose_layoutget_stateid(&lgp->args.stateid,
@@ -6047,7 +6049,7 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)
6047 6049
6048 dprintk("--> %s\n", __func__); 6050 dprintk("--> %s\n", __func__);
6049 6051
6050 if (!nfs4_sequence_done(task, &lgp->res.seq_res)) 6052 if (!nfs41_sequence_done(task, &lgp->res.seq_res))
6051 goto out; 6053 goto out;
6052 6054
6053 switch (task->tk_status) { 6055 switch (task->tk_status) {
@@ -6211,7 +6213,7 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
6211 6213
6212 dprintk("--> %s\n", __func__); 6214 dprintk("--> %s\n", __func__);
6213 6215
6214 if (!nfs4_sequence_done(task, &lrp->res.seq_res)) 6216 if (!nfs41_sequence_done(task, &lrp->res.seq_res))
6215 return; 6217 return;
6216 6218
6217 server = NFS_SERVER(lrp->args.inode); 6219 server = NFS_SERVER(lrp->args.inode);
@@ -6360,8 +6362,9 @@ static void nfs4_layoutcommit_prepare(struct rpc_task *task, void *calldata)
6360{ 6362{
6361 struct nfs4_layoutcommit_data *data = calldata; 6363 struct nfs4_layoutcommit_data *data = calldata;
6362 struct nfs_server *server = NFS_SERVER(data->args.inode); 6364 struct nfs_server *server = NFS_SERVER(data->args.inode);
6365 struct nfs4_session *session = nfs4_get_session(server);
6363 6366
6364 if (nfs4_setup_sequence(server, &data->args.seq_args, 6367 if (nfs41_setup_sequence(session, &data->args.seq_args,
6365 &data->res.seq_res, task)) 6368 &data->res.seq_res, task))
6366 return; 6369 return;
6367 rpc_call_start(task); 6370 rpc_call_start(task);
@@ -6373,7 +6376,7 @@ nfs4_layoutcommit_done(struct rpc_task *task, void *calldata)
6373 struct nfs4_layoutcommit_data *data = calldata; 6376 struct nfs4_layoutcommit_data *data = calldata;
6374 struct nfs_server *server = NFS_SERVER(data->args.inode); 6377 struct nfs_server *server = NFS_SERVER(data->args.inode);
6375 6378
6376 if (!nfs4_sequence_done(task, &data->res.seq_res)) 6379 if (!nfs41_sequence_done(task, &data->res.seq_res))
6377 return; 6380 return;
6378 6381
6379 switch (task->tk_status) { /* Just ignore these failures */ 6382 switch (task->tk_status) { /* Just ignore these failures */