diff options
author | Yongqiang Yang <xiaoqiangnk@gmail.com> | 2011-07-27 20:40:18 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-07-27 20:40:18 -0400 |
commit | e6075e984d100c12bb79267639c3f661d9788a67 (patch) | |
tree | 6c50d26e084fc8b36817f33198f46469dcaa2857 /fs/ext4/resize.c | |
parent | 6d40bc5a7e8fc71795d131e835f38f161ed7e1b1 (diff) |
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>
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r-- | 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 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, | |||
147 | brelse(bh); | 147 | brelse(bh); |
148 | bh = ERR_PTR(err); | 148 | bh = ERR_PTR(err); |
149 | } else { | 149 | } else { |
150 | lock_buffer(bh); | ||
151 | memset(bh->b_data, 0, sb->s_blocksize); | 150 | memset(bh->b_data, 0, sb->s_blocksize); |
152 | set_buffer_uptodate(bh); | 151 | set_buffer_uptodate(bh); |
153 | unlock_buffer(bh); | ||
154 | } | 152 | } |
155 | 153 | ||
156 | return bh; | 154 | return bh; |
@@ -229,10 +227,8 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
229 | brelse(gdb); | 227 | brelse(gdb); |
230 | goto exit_journal; | 228 | goto exit_journal; |
231 | } | 229 | } |
232 | lock_buffer(gdb); | ||
233 | memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->b_size); | 230 | memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->b_size); |
234 | set_buffer_uptodate(gdb); | 231 | set_buffer_uptodate(gdb); |
235 | unlock_buffer(gdb); | ||
236 | err = ext4_handle_dirty_metadata(handle, NULL, gdb); | 232 | err = ext4_handle_dirty_metadata(handle, NULL, gdb); |
237 | if (unlikely(err)) { | 233 | if (unlikely(err)) { |
238 | brelse(gdb); | 234 | brelse(gdb); |