aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2010-06-03 18:16:59 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2010-08-02 15:28:25 -0400
commit652df9a7fd03cb47a3f663f0c08a2bd086505e9b (patch)
treeaf90ae0762a8770e660b4cbb23f7e9225cd5dba7 /net
parent09d34ee5f93b2e53b64ffba27bc18731e31154e1 (diff)
9p: Define and implement TLINK for 9P2000.L
This patch adds a helper function to get the dentry from inode and uses it in creating a Hardlink SYNOPSIS size[4] Tlink tag[2] dfid[4] oldfid[4] newpath[s] size[4] Rlink tag[2] DESCRIPTION Create a link 'newpath' in directory pointed by dfid linking to oldfid path. [sripathik@in.ibm.com : p9_client_link should not free req structure if p9_client_rpc has returned an error.] Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c19
1 files changed, 19 insertions, 0 deletions
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}
1096EXPORT_SYMBOL(p9_client_fcreate); 1096EXPORT_SYMBOL(p9_client_fcreate);
1097 1097
1098int 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}
1115EXPORT_SYMBOL(p9_client_link);
1116
1098int p9_client_clunk(struct p9_fid *fid) 1117int p9_client_clunk(struct p9_fid *fid)
1099{ 1118{
1100 int err; 1119 int err;