提交 1c1d9793 编写于 作者: J Jan Kara 提交者: Joel Becker

ocfs2: Fix initialization of blockcheck stats

We just set blockcheck stats to zeros but we should also
properly initialize the spinlock there.
Signed-off-by: NJan Kara <jack@suse.cz>
Signed-off-by: NJoel Becker <joel.becker@oracle.com>
上级 7669f54c
...@@ -777,6 +777,7 @@ static int ocfs2_sb_probe(struct super_block *sb, ...@@ -777,6 +777,7 @@ static int ocfs2_sb_probe(struct super_block *sb,
} }
di = (struct ocfs2_dinode *) (*bh)->b_data; di = (struct ocfs2_dinode *) (*bh)->b_data;
memset(stats, 0, sizeof(struct ocfs2_blockcheck_stats)); memset(stats, 0, sizeof(struct ocfs2_blockcheck_stats));
spin_lock_init(&stats->b_lock);
status = ocfs2_verify_volume(di, *bh, blksize, stats); status = ocfs2_verify_volume(di, *bh, blksize, stats);
if (status >= 0) if (status >= 0)
goto bail; goto bail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册