提交 c47b74fb 编写于 作者: D Darrick J. Wong

xfs: don't clobber inobt/finobt cursors when xref with rmap

Even if we can't use the inobt/finobt cursors to count the number of
inode btree blocks, we are never allowed to clobber the cursor of the
btree being checked, so don't do this.  Found by fuzzing level = ones
in xfs/364.
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
上级 70c57dcd
...@@ -391,12 +391,12 @@ xfs_scrub_iallocbt_xref_rmap_btreeblks( ...@@ -391,12 +391,12 @@ xfs_scrub_iallocbt_xref_rmap_btreeblks(
/* Check that we saw as many inobt blocks as the rmap says. */ /* Check that we saw as many inobt blocks as the rmap says. */
error = xfs_btree_count_blocks(sc->sa.ino_cur, &inobt_blocks); error = xfs_btree_count_blocks(sc->sa.ino_cur, &inobt_blocks);
if (!xfs_scrub_should_check_xref(sc, &error, &sc->sa.ino_cur)) if (!xfs_scrub_process_error(sc, 0, 0, &error))
return; return;
if (sc->sa.fino_cur) { if (sc->sa.fino_cur) {
error = xfs_btree_count_blocks(sc->sa.fino_cur, &finobt_blocks); error = xfs_btree_count_blocks(sc->sa.fino_cur, &finobt_blocks);
if (!xfs_scrub_should_check_xref(sc, &error, &sc->sa.fino_cur)) if (!xfs_scrub_process_error(sc, 0, 0, &error))
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册