diff mbox

[v2,09/11] ext4: remove lock_buffer in bclean() and setup_new_group_blocks()

Message ID 1311048137-16400-10-git-send-email-xiaoqiangnk@gmail.com
State Accepted, archived
Headers show

Commit Message

Yongqiang Yang July 19, 2011, 4:02 a.m. UTC
Nobody touchs blocks beyond the filesystem, there is no need to lock
the buffers.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

 v1->v2:
   nothing changed.

Comments

Theodore Ts'o July 28, 2011, 12:45 a.m. UTC | #1
On Tue, Jul 19, 2011 at 12:02:15PM +0800, Yongqiang Yang wrote:
> Nobody touchs blocks beyond the filesystem, there is no need to lock
> the buffers.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Added to the ext4 tree, thanks.

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

Patch

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 5b423f8..65e5cb6 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);