Skip to content

Commit c9ffb05

Browse files
Venkateswararao Jujjuri (JV)ericvh
authored andcommitted
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: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
1 parent 48e370f commit c9ffb05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/9p/client.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,8 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
841841
if (err)
842842
goto destroy_fidpool;
843843

844-
if ((clnt->msize+P9_IOHDRSZ) > clnt->trans_mod->maxsize)
845-
clnt->msize = clnt->trans_mod->maxsize-P9_IOHDRSZ;
844+
if (clnt->msize > clnt->trans_mod->maxsize)
845+
clnt->msize = clnt->trans_mod->maxsize;
846846

847847
err = p9_client_version(clnt);
848848
if (err)

0 commit comments

Comments
 (0)