From 2cf166bca8a239271ea6386f8eeea1551fef0e50 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Thu, 27 Aug 2020 13:57:16 -0400 Subject: [PATCH] xfs_db: set b_ops to NULL in set_cur for types without verifiers If we are using set_cur() to set a type that has no verifier ops, be sure to set b_ops to NULL so that the old verifiers don't run against the buffer anymore, which may have changed size. Fixes: cdabe556 ("xfs_db: consolidate set_iocur_type behavior") Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- db/io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/io.c b/db/io.c index 9309f361b..c79cf1059 100644 --- a/db/io.c +++ b/db/io.c @@ -561,8 +561,10 @@ set_cur( return; iocur_top->buf = bp->b_addr; iocur_top->bp = bp; - if (!ops) + if (!ops) { + bp->b_ops = NULL; bp->b_flags |= LIBXFS_B_UNCHECKED; + } iocur_top->bb = blknum; iocur_top->blen = len; -- 2.47.2