diff options
-rw-r--r-- | include/net/9p/9p.h | 2 | ||||
-rw-r--r-- | include/net/9p/client.h | 1 | ||||
-rw-r--r-- | net/9p/client.c | 19 |
3 files changed, 22 insertions, 0 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 7f64d72f6c61..5985c0f83db3 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -139,6 +139,8 @@ enum p9_msg_t { | |||
139 | P9_RSETATTR, | 139 | P9_RSETATTR, |
140 | P9_TREADDIR = 40, | 140 | P9_TREADDIR = 40, |
141 | P9_RREADDIR, | 141 | P9_RREADDIR, |
142 | P9_TLINK = 70, | ||
143 | P9_RLINK, | ||
142 | P9_TVERSION = 100, | 144 | P9_TVERSION = 100, |
143 | P9_RVERSION, | 145 | P9_RVERSION, |
144 | P9_TAUTH = 102, | 146 | P9_TAUTH = 102, |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index afdc385152f6..e36f11650e99 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -226,6 +226,7 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | |||
226 | int p9_client_open(struct p9_fid *fid, int mode); | 226 | int p9_client_open(struct p9_fid *fid, int mode); |
227 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | 227 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, |
228 | char *extension); | 228 | char *extension); |
229 | int p9_client_link(struct p9_fid *fid, struct p9_fid *oldfid, char *newname); | ||
229 | int p9_client_clunk(struct p9_fid *fid); | 230 | int p9_client_clunk(struct p9_fid *fid); |
230 | int p9_client_remove(struct p9_fid *fid); | 231 | int p9_client_remove(struct p9_fid *fid); |
231 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 232 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
diff --git a/net/9p/client.c b/net/9p/client.c index b2f70ec889c2..ad1c4489ab4d 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -1095,6 +1095,25 @@ error: | |||
1095 | } | 1095 | } |
1096 | EXPORT_SYMBOL(p9_client_fcreate); | 1096 | EXPORT_SYMBOL(p9_client_fcreate); |
1097 | 1097 | ||
1098 | int p9_client_link(struct p9_fid *dfid, struct p9_fid *oldfid, char *newname) | ||
1099 | { | ||
1100 | struct p9_client *clnt; | ||
1101 | struct p9_req_t *req; | ||
1102 | |||
1103 | P9_DPRINTK(P9_DEBUG_9P, ">>> TLINK dfid %d oldfid %d newname %s\n", | ||
1104 | dfid->fid, oldfid->fid, newname); | ||
1105 | clnt = dfid->clnt; | ||
1106 | req = p9_client_rpc(clnt, P9_TLINK, "dds", dfid->fid, oldfid->fid, | ||
1107 | newname); | ||
1108 | if (IS_ERR(req)) | ||
1109 | return PTR_ERR(req); | ||
1110 | |||
1111 | P9_DPRINTK(P9_DEBUG_9P, "<<< RLINK\n"); | ||
1112 | p9_free_req(clnt, req); | ||
1113 | return 0; | ||
1114 | } | ||
1115 | EXPORT_SYMBOL(p9_client_link); | ||
1116 | |||
1098 | int p9_client_clunk(struct p9_fid *fid) | 1117 | int p9_client_clunk(struct p9_fid *fid) |
1099 | { | 1118 | { |
1100 | int err; | 1119 | int err; |