aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-01-23 14:17:47 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2018-01-29 10:27:23 -0500
commitc47b74fb2dba46642fc9c2581a28893b42a42815 (patch)
tree01cb59d90f7bd7f13f58632e8346929dd94f8bee
parent70c57dcd606f218b507372a05e633b23351258f0 (diff)
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: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--fs/xfs/scrub/ialloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c
index 21c850abbafd..63ab3f98430d 100644
--- a/fs/xfs/scrub/ialloc.c
+++ b/fs/xfs/scrub/ialloc.c
@@ -391,12 +391,12 @@ xfs_scrub_iallocbt_xref_rmap_btreeblks(
391 391
392 /* Check that we saw as many inobt blocks as the rmap says. */ 392 /* Check that we saw as many inobt blocks as the rmap says. */
393 error = xfs_btree_count_blocks(sc->sa.ino_cur, &inobt_blocks); 393 error = xfs_btree_count_blocks(sc->sa.ino_cur, &inobt_blocks);
394 if (!xfs_scrub_should_check_xref(sc, &error, &sc->sa.ino_cur)) 394 if (!xfs_scrub_process_error(sc, 0, 0, &error))
395 return; 395 return;
396 396
397 if (sc->sa.fino_cur) { 397 if (sc->sa.fino_cur) {
398 error = xfs_btree_count_blocks(sc->sa.fino_cur, &finobt_blocks); 398 error = xfs_btree_count_blocks(sc->sa.fino_cur, &finobt_blocks);
399 if (!xfs_scrub_should_check_xref(sc, &error, &sc->sa.fino_cur)) 399 if (!xfs_scrub_process_error(sc, 0, 0, &error))
400 return; 400 return;
401 } 401 }
402 402