From: Eric Sandeen Date: Thu, 18 Oct 2007 10:06:57 +0000 (-0700) Subject: ext3: fix setup_new_group_blocks locking X-Git-Tag: v2.6.24-rc1~322 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=42a2b6ad71b011144d21d88a124140bb2bf1023f;p=linux-2.6-omap-h63xx.git ext3: fix setup_new_group_blocks locking setup_new_group_blocks() manipulates the group descriptor block bh under the block_bitmap bh's lock. It shouldn't matter since nobody but resize should be touching these blocks, but it's worth fixing up. Signed-off-by: Eric Sandeen C: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 771f7ada15d..44de1453c30 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c @@ -245,10 +245,10 @@ static int setup_new_group_blocks(struct super_block *sb, brelse(gdb); goto exit_bh; } - lock_buffer(bh); - memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, bh->b_size); + lock_buffer(gdb); + memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->b_size); set_buffer_uptodate(gdb); - unlock_buffer(bh); + unlock_buffer(gdb); ext3_journal_dirty_metadata(handle, gdb); ext3_set_bit(bit, bh->b_data); brelse(gdb);