static void p9_fid_destroy(struct p9_fid *fid);
static struct p9_stat *p9_clone_stat(struct p9_stat *st, int dotu);
+/**
+ * p9_client_rpc - sends 9P request and waits until a response is available.
+ * The function can be interrupted.
+ * @c: client data
+ * @tc: request to be sent
+ * @rc: pointer where a pointer to the response is stored
+ */
+int
+p9_client_rpc(struct p9_client *c, struct p9_fcall *tc,
+ struct p9_fcall **rc)
+{
+ if (c->trans->rpc)
+ return c->trans->rpc(c->trans, tc, rc);
+ else
+ return p9_conn_rpc(c->conn, tc, rc);
+}
+
struct p9_client *p9_client_create(struct p9_trans *trans, int msize,
int dotu)
{
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err) {
if (rc && rc->id == P9_RWALK)
goto clunk_fid;
goto error;
}
- p9_conn_rpc(clnt->conn, tc, &rc);
+ p9_client_rpc(clnt->conn, tc, &rc);
error:
kfree(tc);
goto done;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto done;
goto done;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto done;
goto done;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto done;
goto done;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto done;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;
goto done;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
done:
kfree(tc);
goto error;
}
- err = p9_conn_rpc(clnt->conn, tc, &rc);
+ err = p9_client_rpc(clnt->conn, tc, &rc);
if (err)
goto error;