aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/9p/client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 90a2eb926d19..a2e2d61b903b 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1222,10 +1222,11 @@ static int p9_client_statsize(struct p9_wstat *wst, int optional)
1222{ 1222{
1223 int ret; 1223 int ret;
1224 1224
1225 /* NOTE: size shouldn't include its own length */
1225 /* size[2] type[2] dev[4] qid[13] */ 1226 /* size[2] type[2] dev[4] qid[13] */
1226 /* mode[4] atime[4] mtime[4] length[8]*/ 1227 /* mode[4] atime[4] mtime[4] length[8]*/
1227 /* name[s] uid[s] gid[s] muid[s] */ 1228 /* name[s] uid[s] gid[s] muid[s] */
1228 ret = 2+2+4+13+4+4+4+8+2+2+2+2; 1229 ret = 2+4+13+4+4+4+8+2+2+2+2;
1229 1230
1230 if (wst->name) 1231 if (wst->name)
1231 ret += strlen(wst->name); 1232 ret += strlen(wst->name);
@@ -1266,7 +1267,7 @@ int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst)
1266 wst->name, wst->uid, wst->gid, wst->muid, wst->extension, 1267 wst->name, wst->uid, wst->gid, wst->muid, wst->extension,
1267 wst->n_uid, wst->n_gid, wst->n_muid); 1268 wst->n_uid, wst->n_gid, wst->n_muid);
1268 1269
1269 req = p9_client_rpc(clnt, P9_TWSTAT, "dwS", fid->fid, wst->size, wst); 1270 req = p9_client_rpc(clnt, P9_TWSTAT, "dwS", fid->fid, wst->size+2, wst);
1270 if (IS_ERR(req)) { 1271 if (IS_ERR(req)) {
1271 err = PTR_ERR(req); 1272 err = PTR_ERR(req);
1272 goto error; 1273 goto error;