提交 c9ffb05c 编写于 作者: V Venkateswararao Jujjuri (JV) 提交者: Eric Van Hensbergen

net/9p: Fix the msize calculation.

msize represents the maximum PDU size that includes P9_IOHDRSZ.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
上级 48e370ff
...@@ -841,8 +841,8 @@ struct p9_client *p9_client_create(const char *dev_name, char *options) ...@@ -841,8 +841,8 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
if (err) if (err)
goto destroy_fidpool; goto destroy_fidpool;
if ((clnt->msize+P9_IOHDRSZ) > clnt->trans_mod->maxsize) if (clnt->msize > clnt->trans_mod->maxsize)
clnt->msize = clnt->trans_mod->maxsize-P9_IOHDRSZ; clnt->msize = clnt->trans_mod->maxsize;
err = p9_client_version(clnt); err = p9_client_version(clnt);
if (err) if (err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册