On Fri, 2013-07-12 at 12:32 -0400, Chuck Lever wrote: > Pull main logic out of nfs4_call_data_sequence() so it can > eventually be shared with the NFSv4.0 call_sync path. The new > helper function is left behind the NFSv4.1 CONFIG switch for now to > keep compiler warning noise at a minimum. > > Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> > --- > fs/nfs/nfs4proc.c | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) > > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c > index 2f6f3b9..e52d2b3 100644 > --- a/fs/nfs/nfs4proc.c > +++ b/fs/nfs/nfs4proc.c > @@ -393,6 +393,23 @@ static void renew_lease(const struct nfs_server *server, unsigned long timestamp > > #if defined(CONFIG_NFS_V4_1) > > +static int nfs4_run_rpc_task(struct rpc_clnt *clnt, > + struct rpc_message *msg, > + struct rpc_task_setup *task_setup) > +{ > + struct rpc_task *task; > + int ret; > + > + task = rpc_run_task(task_setup); > + if (IS_ERR(task)) > + ret = PTR_ERR(task); > + else { > + ret = task->tk_status; > + rpc_put_task(task); > + } > + return ret; > +} Please don't split this out. Eventually, someone is going to call this with the RPC_TASK_ASYNC flag set, and all hell will break loose. > + > static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res) > { > struct nfs4_session *session; > @@ -674,8 +691,6 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt, > struct nfs4_sequence_args *args, > struct nfs4_sequence_res *res) > { > - int ret; > - struct rpc_task *task; > struct nfs41_call_sync_data data = { > .seq_server = server, > .seq_args = args, > @@ -688,14 +703,7 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt, > .callback_data = &data > }; > > - task = rpc_run_task(&task_setup); > - if (IS_ERR(task)) > - ret = PTR_ERR(task); > - else { > - ret = task->tk_status; > - rpc_put_task(task); > - } > - return ret; > + return nfs4_run_rpc_task(clnt, msg, &task_setup); > } > > #else > > -- > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@xxxxxxxxxx www.netapp.com ��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥