lkml.org 
[lkml]   [2006]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] fat: improve sync performance by grouping writes revised
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 = 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 )
[...]
> + }
[...]
> + int nr_bhs )

Trailing whitespace in those lines.

Jörn

--
Prosperity makes friends, adversity tries them.
-- Publilius Syrus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-31 17:33    [W:0.084 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site