Re: Patch for 2.6.25 queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 26, 2008 at 05:08:49PM +0530, Aneesh Kumar K.V wrote:
> This diff contain mballoc fixes and update for ext3-4 migrate patch.

I will fold these patches into the patch queue in the proper places
(and adjust other patches as necessary).

> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index a60672c..9de0cdf 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -4452,7 +4452,6 @@ do_more:
>  		overflow = bit + count - EXT4_BLOCKS_PER_GROUP(sb);
>  		count -= overflow;
>  	}
> -	put_bh(bitmap_bh);
>  	bitmap_bh = read_block_bitmap(sb, block_group);
>  	if (!bitmap_bh)
>  		goto error_return;

This patch hunk causes a failure due to a botched brelse->put_bh
conversion, but removing it isn't the right fix.  It was there to
avoid a buffer leak on a goto.  So the right fix is to remove the
put_bh() above, but to add one here, circa line 4542 of mballoc.c:

	if (overflow && !err) {
		block += count;
		count = overflow;
+		put_bh(bitmap_bh);
		goto do_more;
	}

And once we do that, we can drop the initialization of bitmap_bh to
NULL, circa line 4408:

			int metadata, unsigned long *freed)
{
-	struct buffer_head *bitmap_bh = NULL;
+	struct buffer_head *bitmap_bh;
	struct super_block *sb = inode->i_sb;
	struct ext4_allocation_context ac;


						- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux