Messages in this thread Patch in this message | | | From | Ye Bin <> | Subject | [PATCH v2 4/6] ext4: remove backup for super block when recovery journal | Date | Fri, 10 Feb 2023 11:20:42 +0800 |
| |
From: Ye Bin <yebin10@huawei.com>
As previous commit "jbd2: do extra handle when do journal recovery" already do extra handle for super block. There's no need to do in ext4_load_journal(), so remove it.
Signed-off-by: Ye Bin <yebin10@huawei.com> --- fs/ext4/super.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ea0fea04907c..d86ee5af2db9 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5916,17 +5916,8 @@ static int ext4_load_journal(struct super_block *sb, if (!ext4_has_feature_journal_needs_recovery(sb)) err = jbd2_journal_wipe(journal, !really_read_only); - if (!err) { - char *save = kmalloc(EXT4_S_ERR_LEN, GFP_KERNEL); - if (save) - memcpy(save, ((char *) es) + - EXT4_S_ERR_START, EXT4_S_ERR_LEN); + if (!err) err = jbd2_journal_load(journal); - if (save) - memcpy(((char *) es) + EXT4_S_ERR_START, - save, EXT4_S_ERR_LEN); - kfree(save); - } if (err) { ext4_msg(sb, KERN_ERR, "error loading journal"); -- 2.31.1
| |