From patchwork Fri Jan 22 20:35:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Van Hensbergen X-Patchwork-Id: 74734 X-Patchwork-Delegate: ericvh@gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0MKaCDE022393 for ; Fri, 22 Jan 2010 20:36:12 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NYQEg-0000RB-Mg; Fri, 22 Jan 2010 20:36:06 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NYQEf-0000R5-GW for v9fs-developer@lists.sourceforge.net; Fri, 22 Jan 2010 20:36:05 +0000 Received-SPF: neutral (sfi-mx-1.v28.ch3.sourceforge.com: 32.97.110.160 is neither permitted nor denied by domain of gmail.com) client-ip=32.97.110.160; envelope-from=ericvh@gmail.com; helo=e39.co.us.ibm.com; Received: from e39.co.us.ibm.com ([32.97.110.160]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NYQEe-0006Ib-1D for v9fs-developer@lists.sourceforge.net; Fri, 22 Jan 2010 20:36:04 +0000 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e39.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o0MKSgB1014401 for ; Fri, 22 Jan 2010 13:28:42 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o0MKZpZM037314 for ; Fri, 22 Jan 2010 13:35:51 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o0MKZod9024508 for ; Fri, 22 Jan 2010 13:35:50 -0700 Received: from localhost.localdomain (arlx077.austin.ibm.com [9.3.61.77]) by d03av02.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o0MKZmbm024395; Fri, 22 Jan 2010 13:35:49 -0700 From: Eric Van Hensbergen To: v9fs-developer@lists.sourceforge.net Date: Fri, 22 Jan 2010 14:35:47 -0600 Message-Id: <1264192547-7231-1-git-send-email-ericvh@gmail.com> X-Mailer: git-send-email 1.5.5 X-Spam-Score: -0.8 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.2 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -2.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NYQEe-0006Ib-1D Cc: Eric Van Hensbergen Subject: [V9fs-developer] [PATCH] net/9p: fix statsize inside twstat X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net diff --git a/net/9p/client.c b/net/9p/client.c index 90a2eb9..a2e2d61 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) { int ret; + /* NOTE: size shouldn't include its own length */ /* size[2] type[2] dev[4] qid[13] */ /* mode[4] atime[4] mtime[4] length[8]*/ /* name[s] uid[s] gid[s] muid[s] */ - ret = 2+2+4+13+4+4+4+8+2+2+2+2; + ret = 2+4+13+4+4+4+8+2+2+2+2; if (wst->name) ret += strlen(wst->name); @@ -1266,7 +1267,7 @@ int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst) wst->name, wst->uid, wst->gid, wst->muid, wst->extension, wst->n_uid, wst->n_gid, wst->n_muid); - req = p9_client_rpc(clnt, P9_TWSTAT, "dwS", fid->fid, wst->size, wst); + req = p9_client_rpc(clnt, P9_TWSTAT, "dwS", fid->fid, wst->size+2, wst); if (IS_ERR(req)) { err = PTR_ERR(req); goto error;