Skip to content

Commit

Permalink
9p: Fix setting of protocol flags in v9fs_session_info structure.
Browse files Browse the repository at this point in the history
This patch fixes a simple bug I left behind in my earlier protocol
negotiation patch.

Thanks,
Sripathi.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Sripathi Kodi authored and Eric Van Hensbergen committed Apr 5, 2010
1 parent db217de commit 476ada0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ 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_PROTO_2000U | V9FS_ACCESS_USER;
v9ses->flags = V9FS_ACCESS_USER;
strcpy(v9ses->uname, V9FS_DEFUSER);
strcpy(v9ses->aname, V9FS_DEFANAME);
v9ses->uid = ~0;
Expand All @@ -262,8 +262,10 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
goto error;
}

if (!p9_is_proto_dotu(v9ses->clnt))
v9ses->flags &= ~V9FS_PROTO_2000U;
if (p9_is_proto_dotl(v9ses->clnt))
v9ses->flags |= V9FS_PROTO_2000L;
else if (p9_is_proto_dotu(v9ses->clnt))
v9ses->flags |= V9FS_PROTO_2000U;

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

Expand Down

0 comments on commit 476ada0

Please sign in to comment.