From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Van Hensbergen Subject: Re: [V9fs-developer] [PATCH] [fs/9p] Remove the redundant rsize calculation in v9fs_file_write() Date: Mon, 23 Aug 2010 11:15:04 -0500 Message-ID: References: <1282065602-3836-1-git-send-email-jvrao@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, Badari Pulavarty To: "Venkateswararao Jujjuri (JV)" Return-path: Received: from mail-gx0-f174.google.com ([209.85.161.174]:45327 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754375Ab0HWQPF convert rfc822-to-8bit (ORCPT ); Mon, 23 Aug 2010 12:15:05 -0400 Received: by gxk23 with SMTP id 23so2157781gxk.19 for ; Mon, 23 Aug 2010 09:15:04 -0700 (PDT) In-Reply-To: <1282065602-3836-1-git-send-email-jvrao@linux.vnet.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: If we are eliminating the check, we should just eliminate the calculation higher up (and the rsize variable) from this function. Please resubmit with more extensive cleanup. Thanks. -eric On Tue, Aug 17, 2010 at 12:20 PM, Venkateswararao Jujjuri (JV) wrote: > The same calculation is done in p9_client_write(). > > Signed-off-by: Venkateswararao Jujjuri > Signed-off-by: Badari Pulavarty > --- > =A0fs/9p/vfs_file.c | =A0 =A05 +---- > =A01 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c > index e97c92b..2695491 100644 > --- a/fs/9p/vfs_file.c > +++ b/fs/9p/vfs_file.c > @@ -235,11 +235,8 @@ v9fs_file_write(struct file *filp, const char __= user * data, > =A0 =A0 =A0 =A0rsize =3D fid->iounit ? fid->iounit : clnt->msize - P9= _IOHDRSZ; > > =A0 =A0 =A0 =A0do { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (count < rsize) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 rsize =3D count; > - > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0n =3D p9_client_write(fid, NULL, data+= total, origin+total, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= rsize); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= count); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (n <=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0count -=3D n; > -- > 1.6.5.2 > > > ---------------------------------------------------------------------= --------- > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > V9fs-developer mailing list > V9fs-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/v9fs-developer > -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html