aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/9p/client.c')
-rw-r--r--net/9p/client.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index a3bdd341f2ac..e580409b1052 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1050,6 +1050,50 @@ error:
1050} 1050}
1051EXPORT_SYMBOL(p9_client_open); 1051EXPORT_SYMBOL(p9_client_open);
1052 1052
1053int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode,
1054 gid_t gid, struct p9_qid *qid)
1055{
1056 int err = 0;
1057 struct p9_client *clnt;
1058 struct p9_req_t *req;
1059 int iounit;
1060
1061 P9_DPRINTK(P9_DEBUG_9P,
1062 ">>> TLCREATE fid %d name %s flags %d mode %d gid %d\n",
1063 ofid->fid, name, flags, mode, gid);
1064 clnt = ofid->clnt;
1065
1066 if (ofid->mode != -1)
1067 return -EINVAL;
1068
1069 req = p9_client_rpc(clnt, P9_TLCREATE, "dsddd", ofid->fid, name, flags,
1070 mode, gid);
1071 if (IS_ERR(req)) {
1072 err = PTR_ERR(req);
1073 goto error;
1074 }
1075
1076 err = p9pdu_readf(req->rc, clnt->proto_version, "Qd", qid, &iounit);
1077 if (err) {
1078 p9pdu_dump(1, req->rc);
1079 goto free_and_error;
1080 }
1081
1082 P9_DPRINTK(P9_DEBUG_9P, "<<< RLCREATE qid %x.%llx.%x iounit %x\n",
1083 qid->type,
1084 (unsigned long long)qid->path,
1085 qid->version, iounit);
1086
1087 ofid->mode = mode;
1088 ofid->iounit = iounit;
1089
1090free_and_error:
1091 p9_free_req(clnt, req);
1092error:
1093 return err;
1094}
1095EXPORT_SYMBOL(p9_client_create_dotl);
1096
1053int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, 1097int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode,
1054 char *extension) 1098 char *extension)
1055{ 1099{