I didn't pay too much attention, but found some low hanging fruits.For some reason it compiles without warnings for me, but I'll switch the order.
On Thu, 26 October 2006 07:59:42 -0400, Holden Karau wrote:
>
> -/* FIXME: We can write the blocks as more big chunk. */
> static int fat_mirror_bhs(struct super_block *sb, struct buffer_head **bhs,
> - int nr_bhs)
> + int nr_bhs ) {
> + return fat_mirror_bhs_optw(sb , bhs , nr_bhs, 0);
> +}
> +
> +static int fat_mirror_bhs_optw(struct super_block *sb, struct buffer_head **bhs,
> + int nr_bhs , int wait)
Does this compile without warnings? Looks as if you should reverse
the order of the two functions.
> {Sorry about that. A lot of the places where I used braces are because
> struct msdos_sb_info *sbi = MSDOS_SB(sb);
> - struct buffer_head *c_bh;
> + struct buffer_head *c_bh[nr_bhs];
> int err, n, copy;
>
> + /* Always wait if mounted -o sync */
> + if (sb->s_flags & MS_SYNCHRONOUS ) {
> + wait = 1;
> + }
Coding style. Use a tab for indentation and don't use braces for
single-line conditional statements.
> +.... no comment :-)
> err = 0;
> + err = fat_sync_bhs_optw( bhs , nr_bhs , wait);
The err=0; is superfluous now, isn't it?
> + if (err)oops :-) I'll fix that.
> + goto error;
Indentation.
Jörn
--
Fantasy is more important than knowledge. Knowledge is limited,
while fantasy embraces the whole world.
-- Albert Einstein