[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1310957555-15617-11-git-send-email-xiaoqiangnk@gmail.com>
Date: Mon, 18 Jul 2011 10:52:33 +0800
From: Yongqiang Yang <xiaoqiangnk@...il.com>
To: linux-ext4@...r.kernel.org
Cc: aedilger@...il.com, Yongqiang Yang <xiaoqiangnk@...il.com>
Subject: [PATCH 10/12] ext4: remove lock_buffer in bclean() and setup_new_group_blocks
Nobody touchs blocks beyond the filesystem, there is no need to lock
the buffers.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@...il.com>
---
fs/ext4/resize.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index ac5b63d..e452bee 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -157,10 +157,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;
@@ -239,10 +237,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);
--
1.7.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists