summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Brüns <stefan.bruens@rwth-aachen.de>2016-09-06 05:36:48 +0300
committerDongjin Kim <tobetter@gmail.com>2020-02-10 16:44:41 +0300
commitc2e8ecd951ebd31e1d0a595e231790a61f274251 (patch)
tree41c6fdbab12ced08d953adf6796ea66f35a82bc5
parent2663ee34de4b9bdc307c6d811a50dee2b12ed67a (diff)
downloadu-boot-c2e8ecd951ebd31e1d0a595e231790a61f274251.tar.xz
ext4: Do not clear zalloc'ed buffers a second time
zero_buffer is never written, thus clearing it is pointless. journal_buffer is completely initialized by ext4fs_devread (or in case of failure, not used). Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
-rw-r--r--fs/ext4/ext4_common.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 5984c81199..094baa20bf 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -937,7 +937,6 @@ restart:
if (le16_to_cpu(bgd[bg_idx].bg_flags) & EXT4_BG_BLOCK_UNINIT) {
uint16_t new_flags;
- memset(zero_buffer, '\0', fs->blksz);
put_ext4((uint64_t)le32_to_cpu(bgd[bg_idx].block_id) * fs->blksz,
zero_buffer, fs->blksz);
memcpy(fs->blk_bmaps[bg_idx], zero_buffer, fs->blksz);
@@ -954,7 +953,6 @@ restart:
/* journal backup */
if (prev_bg_bitmap_index != bg_idx) {
- memset(journal_buffer, '\0', fs->blksz);
status = ext4fs_devread(
(lbaint_t)le32_to_cpu(bgd[bg_idx].block_id)
* fs->sect_perblk,
@@ -1048,7 +1046,6 @@ restart:
ibmap_idx = fs->curr_inode_no / inodes_per_grp;
if (le16_to_cpu(bgd[ibmap_idx].bg_flags) & EXT4_BG_INODE_UNINIT) {
int new_flags;
- memset(zero_buffer, '\0', fs->blksz);
put_ext4((uint64_t)le32_to_cpu(bgd[ibmap_idx].inode_id) * fs->blksz,
zero_buffer, fs->blksz);
new_flags = le16_to_cpu(bgd[ibmap_idx].bg_flags) & ~EXT4_BG_INODE_UNINIT;