From: Yongqiang Yang Date: Thu, 28 Jul 2011 00:40:18 +0000 (-0400) Subject: ext4: remove lock_buffer in bclean() and setup_new_group_blocks() X-Git-Tag: MMI-PSA29.97-13-9~18703^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6075e984d100c12bb79267639c3f661d9788a67;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 5b423f89efda..65e5cb6c094d 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -147,10 +147,8 @@ static struct buffer_head *bclean(handle_t *handle, struct super_block *sb, brelse(bh); bh = ERR_PTR(err); } else { - lock_buffer(bh); memset(bh->b_data, 0, sb->s_blocksize); set_buffer_uptodate(bh); - unlock_buffer(bh); } return bh; @@ -229,10 +227,8 @@ static int setup_new_group_blocks(struct super_block *sb, brelse(gdb); goto exit_journal; } - lock_buffer(gdb); memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->b_size); set_buffer_uptodate(gdb); - unlock_buffer(gdb); err = ext4_handle_dirty_metadata(handle, NULL, gdb); if (unlikely(err)) { brelse(gdb);