mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
SUNRPC: Clean up rpc_run_task
Make it use the new task initialiser structure instead of acting as a wrapper. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
84115e1cd4
commit
c970aa85e7
5 changed files with 67 additions and 38 deletions
|
@ -310,6 +310,10 @@ void rpcb_getport_async(struct rpc_task *task)
|
|||
struct rpc_clnt *rpcb_clnt;
|
||||
static struct rpcbind_args *map;
|
||||
struct rpc_task *child;
|
||||
struct rpc_task_setup task_setup_data = {
|
||||
.callback_ops = &rpcb_getport_ops,
|
||||
.flags = RPC_TASK_ASYNC,
|
||||
};
|
||||
struct sockaddr addr;
|
||||
int status;
|
||||
struct rpcb_info *info;
|
||||
|
@ -395,7 +399,9 @@ void rpcb_getport_async(struct rpc_task *task)
|
|||
sizeof(map->r_addr));
|
||||
map->r_owner = RPCB_OWNER_STRING; /* ignored for GETADDR */
|
||||
|
||||
child = rpc_run_task(rpcb_clnt, RPC_TASK_ASYNC, &rpcb_getport_ops, map);
|
||||
task_setup_data.rpc_client = rpcb_clnt;
|
||||
task_setup_data.callback_data = map;
|
||||
child = rpc_run_task(&task_setup_data);
|
||||
rpc_release_client(rpcb_clnt);
|
||||
if (IS_ERR(child)) {
|
||||
status = -EIO;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue