Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9ffb05c authored by Venkateswararao Jujjuri (JV)'s avatar Venkateswararao Jujjuri (JV) Committed by Eric Van Hensbergen
Browse files

net/9p: Fix the msize calculation.



msize represents the maximum PDU size that includes P9_IOHDRSZ.

Signed-off-by: default avatarVenkateswararao Jujjuri <"&lt;jvrao@linux.vnet.ibm.com>
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent 48e370ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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)