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.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index ad1c4489ab4d..e37e64cb9394 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1095,6 +1095,40 @@ error:
1095} 1095}
1096EXPORT_SYMBOL(p9_client_fcreate); 1096EXPORT_SYMBOL(p9_client_fcreate);
1097 1097
1098int p9_client_symlink(struct p9_fid *dfid, char *name, char *symtgt, gid_t gid,
1099 struct p9_qid *qid)
1100{
1101 int err = 0;
1102 struct p9_client *clnt;
1103 struct p9_req_t *req;
1104
1105 P9_DPRINTK(P9_DEBUG_9P, ">>> TSYMLINK dfid %d name %s symtgt %s\n",
1106 dfid->fid, name, symtgt);
1107 clnt = dfid->clnt;
1108
1109 req = p9_client_rpc(clnt, P9_TSYMLINK, "dssd", dfid->fid, name, symtgt,
1110 gid);
1111 if (IS_ERR(req)) {
1112 err = PTR_ERR(req);
1113 goto error;
1114 }
1115
1116 err = p9pdu_readf(req->rc, clnt->proto_version, "Q", qid);
1117 if (err) {
1118 p9pdu_dump(1, req->rc);
1119 goto free_and_error;
1120 }
1121
1122 P9_DPRINTK(P9_DEBUG_9P, "<<< RSYMLINK qid %x.%llx.%x\n",
1123 qid->type, (unsigned long long)qid->path, qid->version);
1124
1125free_and_error:
1126 p9_free_req(clnt, req);
1127error:
1128 return err;
1129}
1130EXPORT_SYMBOL(p9_client_symlink);
1131
1098int p9_client_link(struct p9_fid *dfid, struct p9_fid *oldfid, char *newname) 1132int p9_client_link(struct p9_fid *dfid, struct p9_fid *oldfid, char *newname)
1099{ 1133{
1100 struct p9_client *clnt; 1134 struct p9_client *clnt;