Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e1550d6 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Add the helper function 'rpc_call_null()'



Does a NULL RPC call and returns a pointer to the resulting rpc_task. The
call may be either synchronous or asynchronous.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 64c91a1f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -130,6 +130,8 @@ int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg,
			       void *calldata);
int		rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg,
			      int flags);
struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred,
			       int flags);
void		rpc_restart_call(struct rpc_task *);
void		rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset);
void		rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset);
+10 −0
Original line number Diff line number Diff line
@@ -1455,6 +1455,16 @@ static int rpc_ping(struct rpc_clnt *clnt, int flags)
	return err;
}

struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags)
{
	struct rpc_message msg = {
		.rpc_proc = &rpcproc_null,
		.rpc_cred = cred,
	};
	return rpc_do_run_task(clnt, &msg, flags, &rpc_default_ops, NULL);
}
EXPORT_SYMBOL(rpc_call_null);

#ifdef RPC_DEBUG
void rpc_show_tasks(void)
{