Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e1550d6a2c2dd33ff0ca5febefd8e9c65c6ca1e
Commit:     5e1550d6a2c2dd33ff0ca5febefd8e9c65c6ca1e
Parent:     64c91a1f1c8bc4295fd6b90df8adf911a7dd64f4
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 23 10:17:16 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 23:40:34 2007 -0400

    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: Trond Myklebust <[EMAIL PROTECTED]>
---
 include/linux/sunrpc/clnt.h |    2 ++
 net/sunrpc/clnt.c           |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index a0e51e1..097984b 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -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);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 4e91f31..5a28ffa 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -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)
 {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to