Commit 42a2b6ad authored by Eric Sandeen's avatar Eric Sandeen Committed by Linus Torvalds
Browse files

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: default avatarEric Sandeen <>
C: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 0f0a89eb
...@@ -245,10 +245,10 @@ static int setup_new_group_blocks(struct super_block *sb, ...@@ -245,10 +245,10 @@ static int setup_new_group_blocks(struct super_block *sb,
brelse(gdb); brelse(gdb);
goto exit_bh; goto exit_bh;
} }
lock_buffer(bh); lock_buffer(gdb);
memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, bh->b_size); memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->b_size);
set_buffer_uptodate(gdb); set_buffer_uptodate(gdb);
unlock_buffer(bh); unlock_buffer(gdb);
ext3_journal_dirty_metadata(handle, gdb); ext3_journal_dirty_metadata(handle, gdb);
ext3_set_bit(bit, bh->b_data); ext3_set_bit(bit, bh->b_data);
brelse(gdb); brelse(gdb);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment