• Eric Sandeen's avatar
    xfs: get mp from bma->ip in xfs_bmap code · f1f96c49
    Eric Sandeen authored
    In my earlier commit
    
      c29aad41 xfs: pass mp to XFS_WANT_CORRUPTED_GOTO
    
    I added some local mp variables with code which indicates that
    mp might be NULL.  Coverity doesn't like this now, because the
    updated per-fs XFS_STATS macros dereference mp.
    
    I don't think this is actually a problem; from what I can tell,
    we cannot get to these functions with a null bma->tp, so my NULL
    check was probably pointless.  Still, it's not super obvious.
    
    So switch this code to get mp from the inode on the xfs_bmalloca
    structure, with no conditional, because the functions are already
    using bmap->ip directly.
    
    Addresses-Coverity-Id: 1339552
    Addresses-Coverity-Id: 1339553
    Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    
    f1f96c49
xfs_bmap.c 171 KB