aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index e580409b1052..c458e042d384 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1016,14 +1016,18 @@ int p9_client_open(struct p9_fid *fid, int mode)
1016 struct p9_qid qid; 1016 struct p9_qid qid;
1017 int iounit; 1017 int iounit;
1018 1018
1019 P9_DPRINTK(P9_DEBUG_9P, ">>> TOPEN fid %d mode %d\n", fid->fid, mode);
1020 err = 0;
1021 clnt = fid->clnt; 1019 clnt = fid->clnt;
1020 P9_DPRINTK(P9_DEBUG_9P, ">>> %s fid %d mode %d\n",
1021 p9_is_proto_dotl(clnt) ? "TLOPEN" : "TOPEN", fid->fid, mode);
1022 err = 0;
1022 1023
1023 if (fid->mode != -1) 1024 if (fid->mode != -1)
1024 return -EINVAL; 1025 return -EINVAL;
1025 1026
1026 req = p9_client_rpc(clnt, P9_TOPEN, "db", fid->fid, mode); 1027 if (p9_is_proto_dotl(clnt))
1028 req = p9_client_rpc(clnt, P9_TLOPEN, "dd", fid->fid, mode);
1029 else
1030 req = p9_client_rpc(clnt, P9_TOPEN, "db", fid->fid, mode);
1027 if (IS_ERR(req)) { 1031 if (IS_ERR(req)) {
1028 err = PTR_ERR(req); 1032 err = PTR_ERR(req);
1029 goto error; 1033 goto error;
@@ -1035,10 +1039,9 @@ int p9_client_open(struct p9_fid *fid, int mode)
1035 goto free_and_error; 1039 goto free_and_error;
1036 } 1040 }
1037 1041
1038 P9_DPRINTK(P9_DEBUG_9P, "<<< ROPEN qid %x.%llx.%x iounit %x\n", 1042 P9_DPRINTK(P9_DEBUG_9P, "<<< %s qid %x.%llx.%x iounit %x\n",
1039 qid.type, 1043 p9_is_proto_dotl(clnt) ? "RLOPEN" : "ROPEN", qid.type,
1040 (unsigned long long)qid.path, 1044 (unsigned long long)qid.path, qid.version, iounit);
1041 qid.version, iounit);
1042 1045
1043 fid->mode = mode; 1046 fid->mode = mode;
1044 fid->iounit = iounit; 1047 fid->iounit = iounit;