Unverified Commit 72d0ce6c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12977 ext4: fix access to uninitialised lock in fc replay path

parents ed0a2bc9 1a584285
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5458,6 +5458,8 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
	INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */
	mutex_init(&sbi->s_orphan_lock);

	spin_lock_init(&sbi->s_bdev_wb_lock);

	ext4_fast_commit_init(sb);

	sb->s_root = NULL;
@@ -5678,7 +5680,6 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
	 * Save the original bdev mapping's wb_err value which could be
	 * used to detect the metadata async write error.
	 */
	spin_lock_init(&sbi->s_bdev_wb_lock);
	errseq_check_and_advance(&sb->s_bdev->bd_inode->i_mapping->wb_err,
				 &sbi->s_bdev_wb_err);
	EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS;