Introduce a simple helper function to only prepare a p9 client request,
without any waiting involved.

Currently not utilized, but it will be used by a later patch.

Signed-off-by: Stefano Stabellini <sstabell...@kernel.org>
---
 net/9p/client.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/net/9p/client.c b/net/9p/client.c
index 517bc20..0ff1216 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -723,6 +723,18 @@ static struct p9_req_t *p9_client_prepare_req(struct 
p9_client *c,
        return ERR_PTR(err);
 }
 
+static struct p9_req_t *
+p9_client_get_req(struct p9_client *c, int8_t type, const char *fmt, ...)
+{
+       va_list ap;
+       struct p9_req_t *req;
+
+       va_start(ap, fmt);
+       req = p9_client_prepare_req(c, type, c->msize, fmt, ap);
+       va_end(ap);
+       return req;
+}
+
 /**
  * p9_client_rpc - issue a request and wait for a response
  * @c: client session
-- 
1.9.1

Reply via email to