aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/v9fs.c
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2011-01-26 19:20:35 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-15 10:57:34 -0400
commit6752a1ebd13f69b9d5ff08914fe29ee2813cbeea (patch)
tree32148da68211610f3e5bef0185771d7b22276719 /fs/9p/v9fs.c
parente782ef71097e832f62256370a2fe231b9fba96cf (diff)
[fs/9p] Make access=client default in 9p2000.L protocol
Current code sets access=user as default for all protocol versions. This patch chagnes it to "client" only for dotl. User can always specify particular access mode with -o access= option. No change there. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r--fs/9p/v9fs.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index f5a3200877d6..738be8f6994f 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -263,19 +263,12 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
263 list_add(&v9ses->slist, &v9fs_sessionlist); 263 list_add(&v9ses->slist, &v9fs_sessionlist);
264 spin_unlock(&v9fs_sessionlist_lock); 264 spin_unlock(&v9fs_sessionlist_lock);
265 265
266 v9ses->flags = V9FS_ACCESS_USER;
267 strcpy(v9ses->uname, V9FS_DEFUSER); 266 strcpy(v9ses->uname, V9FS_DEFUSER);
268 strcpy(v9ses->aname, V9FS_DEFANAME); 267 strcpy(v9ses->aname, V9FS_DEFANAME);
269 v9ses->uid = ~0; 268 v9ses->uid = ~0;
270 v9ses->dfltuid = V9FS_DEFUID; 269 v9ses->dfltuid = V9FS_DEFUID;
271 v9ses->dfltgid = V9FS_DEFGID; 270 v9ses->dfltgid = V9FS_DEFGID;
272 271
273 rc = v9fs_parse_options(v9ses, data);
274 if (rc < 0) {
275 retval = rc;
276 goto error;
277 }
278
279 v9ses->clnt = p9_client_create(dev_name, data); 272 v9ses->clnt = p9_client_create(dev_name, data);
280 if (IS_ERR(v9ses->clnt)) { 273 if (IS_ERR(v9ses->clnt)) {
281 retval = PTR_ERR(v9ses->clnt); 274 retval = PTR_ERR(v9ses->clnt);
@@ -284,10 +277,20 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
284 goto error; 277 goto error;
285 } 278 }
286 279
287 if (p9_is_proto_dotl(v9ses->clnt)) 280 v9ses->flags = V9FS_ACCESS_USER;
281
282 if (p9_is_proto_dotl(v9ses->clnt)) {
283 v9ses->flags = V9FS_ACCESS_CLIENT;
288 v9ses->flags |= V9FS_PROTO_2000L; 284 v9ses->flags |= V9FS_PROTO_2000L;
289 else if (p9_is_proto_dotu(v9ses->clnt)) 285 } else if (p9_is_proto_dotu(v9ses->clnt)) {
290 v9ses->flags |= V9FS_PROTO_2000U; 286 v9ses->flags |= V9FS_PROTO_2000U;
287 }
288
289 rc = v9fs_parse_options(v9ses, data);
290 if (rc < 0) {
291 retval = rc;
292 goto error;
293 }
291 294
292 v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ; 295 v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ;
293 296