xfs_db: set b_ops to NULL in set_cur for types without verifiers
PATCH 1/1 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 <[email protected]>
---
db/io.c +3 -1
@@ -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;
Quoted 6 lines · Eric Sandeen
If we are using
set_cur()to set a type that has no verifier ops, be sure to setb_opsto 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 <[email protected]>
Seems to fix the xfs/070 regression, thanks.
Reviewed-by Darrick J. Wong <[email protected]>
--D
Quoted 19 lines
---
db/io.c +3
-1@@ -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;