]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: set b_ops to NULL in set_cur for types without verifiers
authorEric Sandeen <sandeen@redhat.com>
Thu, 27 Aug 2020 17:57:16 +0000 (13:57 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 27 Aug 2020 17:57:16 +0000 (13:57 -0400)
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 <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/io.c

diff --git a/db/io.c b/db/io.c
index 9309f361bf0fe0988c9ab8015a941d07ad7a4a67..c79cf1059b9e7e202a2fe3d20dd676251c084b97 100644 (file)
--- 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;