From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?J=F6rn?= Engel Subject: Re: [PATCH 1/1] fat: improve sync performance by grouping writes revised Date: Tue, 31 Oct 2006 17:30:02 +0100 Message-ID: <20061031163002.GC23021@wohnheim.fh-wedel.de> References: <454765AC.1050905@xandros.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Josef Sipek , hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org, "akpm@osdl.org" , linux-fsdevel@vger.kernel.org, holden@pigscanfly.ca, holden.karau@gmail.com, Nick Piggin Return-path: Received: from wohnheim.fh-wedel.de ([213.39.233.138]:55457 "EHLO wohnheim.fh-wedel.de") by vger.kernel.org with ESMTP id S1423459AbWJaQa0 (ORCPT ); Tue, 31 Oct 2006 11:30:26 -0500 To: Holden Karau Content-Disposition: inline In-Reply-To: <454765AC.1050905@xandros.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 31 October 2006 10:03:08 -0500, Holden Karau wrote: > +static int fat_mirror_bhs_optw(struct super_block *sb, struct buffer= _head **bhs, > + int nr_bhs , int wait) > { > struct msdos_sb_info *sbi =3D MSDOS_SB(sb); > - struct buffer_head *c_bh; > + struct buffer_head *c_bh[nr_bhs*(sbi->fats)]; Variable-sized array on the kernel-stack? That can easily explode in your hands. Unless you are _very_ sure about the bounds, you should do an explicit kmalloc. And if you were that sure, you could just as well have an array with fixed size. > + if (sb->s_flags & MS_SYNCHRONOUS )=20 [...] > + }=09 [...] > + int nr_bhs )=20 Trailing whitespace in those lines. J=F6rn --=20 Prosperity makes friends, adversity tries them. -- Publilius Syrus - 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