lkml.org 
[lkml]   [2005]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 5/6] 2.4.19-rc1 rpc_call_sync() stack reduction patch
From
Date

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
--- linux-2.4.29-rc1.org/net/sunrpc/clnt.c 2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.29-rc1/net/sunrpc/clnt.c 2005-01-09 23:08:31.000000000 -0800
@@ -238,7 +238,7 @@ void rpc_clnt_sigunmask(struct rpc_clnt
*/
int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
{
- struct rpc_task my_task, *task = &my_task;
+ struct rpc_task *task;
sigset_t oldset;
int status;

@@ -253,8 +253,11 @@ int rpc_call_sync(struct rpc_clnt *clnt,

rpc_clnt_sigmask(clnt, &oldset);

- /* Create/initialize a new RPC task */
- rpc_init_task(task, clnt, NULL, flags);
+ status = -ENOMEM;
+ task = rpc_new_task(clnt, NULL, flags);
+ if (task == NULL)
+ goto out;
+
rpc_call_setup(task, msg, 0);

/* Set up the call info struct and execute the task */
@@ -265,6 +268,7 @@ int rpc_call_sync(struct rpc_clnt *clnt,
rpc_release_task(task);
}

+out:
rpc_clnt_sigunmask(clnt, &oldset);

return status;
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.078 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site