Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235009
b: refs/heads/master
c: 6752a1e
h: refs/heads/master
i:
  235007: f469f1f
v: v3
  • Loading branch information
Venkateswararao Jujjuri (JV) authored and Eric Van Hensbergen committed Mar 15, 2011
1 parent 1fa5216 commit 0dcfe0b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e782ef71097e832f62256370a2fe231b9fba96cf
refs/heads/master: 6752a1ebd13f69b9d5ff08914fe29ee2813cbeea
21 changes: 12 additions & 9 deletions trunk/fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,19 +263,12 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
list_add(&v9ses->slist, &v9fs_sessionlist);
spin_unlock(&v9fs_sessionlist_lock);

v9ses->flags = V9FS_ACCESS_USER;
strcpy(v9ses->uname, V9FS_DEFUSER);
strcpy(v9ses->aname, V9FS_DEFANAME);
v9ses->uid = ~0;
v9ses->dfltuid = V9FS_DEFUID;
v9ses->dfltgid = V9FS_DEFGID;

rc = v9fs_parse_options(v9ses, data);
if (rc < 0) {
retval = rc;
goto error;
}

v9ses->clnt = p9_client_create(dev_name, data);
if (IS_ERR(v9ses->clnt)) {
retval = PTR_ERR(v9ses->clnt);
Expand All @@ -284,10 +277,20 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
goto error;
}

if (p9_is_proto_dotl(v9ses->clnt))
v9ses->flags = V9FS_ACCESS_USER;

if (p9_is_proto_dotl(v9ses->clnt)) {
v9ses->flags = V9FS_ACCESS_CLIENT;
v9ses->flags |= V9FS_PROTO_2000L;
else if (p9_is_proto_dotu(v9ses->clnt))
} else if (p9_is_proto_dotu(v9ses->clnt)) {
v9ses->flags |= V9FS_PROTO_2000U;
}

rc = v9fs_parse_options(v9ses, data);
if (rc < 0) {
retval = rc;
goto error;
}

v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ;

Expand Down

0 comments on commit 0dcfe0b

Please sign in to comment.