Skip to content
  • Darrick J. Wong's avatar
    xfs: set buffer ops when repair probes for btree type · add46b3b
    Darrick J. Wong authored
    
    
    In xrep_findroot_block, we work out the btree type and correctness of a
    given block by calling different btree verifiers on root block
    candidates.  However, we leave the NULL b_ops while ->verify_read
    validates the block, which means that if the verifier calls
    xfs_buf_verifier_error it'll crash on the null b_ops.  Fix it to set
    b_ops before calling the verifier and unsetting it if the verifier
    fails.
    
    Furthermore, improve the documentation around xfs_buf_ensure_ops, which
    is the function that is responsible for cleaning up the b_ops state of
    buffers that go through xrep_findroot_block but don't match anything.
    
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    add46b3b