ext4: remove lock_buffer in bclean() and setup_new_group_blocks()
There is no need to lock the buffers since no one else should be touching these buffers besides the file system. Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
6d40bc5a7e
commit
e6075e984d
@@ -147,10 +147,8 @@ static struct buffer_head *bclean(handle_t *handle, struct super_block *sb,
|
|||||||
brelse(bh);
|
brelse(bh);
|
||||||
bh = ERR_PTR(err);
|
bh = ERR_PTR(err);
|
||||||
} else {
|
} else {
|
||||||
lock_buffer(bh);
|
|
||||||
memset(bh->b_data, 0, sb->s_blocksize);
|
memset(bh->b_data, 0, sb->s_blocksize);
|
||||||
set_buffer_uptodate(bh);
|
set_buffer_uptodate(bh);
|
||||||
unlock_buffer(bh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return bh;
|
return bh;
|
||||||
@@ -229,10 +227,8 @@ static int setup_new_group_blocks(struct super_block *sb,
|
|||||||
brelse(gdb);
|
brelse(gdb);
|
||||||
goto exit_journal;
|
goto exit_journal;
|
||||||
}
|
}
|
||||||
lock_buffer(gdb);
|
|
||||||
memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->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(gdb);
|
|
||||||
err = ext4_handle_dirty_metadata(handle, NULL, gdb);
|
err = ext4_handle_dirty_metadata(handle, NULL, gdb);
|
||||||
if (unlikely(err)) {
|
if (unlikely(err)) {
|
||||||
brelse(gdb);
|
brelse(gdb);
|
||||||
|
Reference in New Issue
Block a user