]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: get mp from bma->ip in xfs_bmap code
authorEric Sandeen <sandeen@redhat.com>
Wed, 17 Feb 2016 05:44:57 +0000 (16:44 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 17 Feb 2016 05:44:57 +0000 (16:44 +1100)
commit65ca3804f81ff516056c1822e2817707c167630e
tree0f29f55911e1e721ef3061d34bdd36ed10242fa4
parent9542ae13b3fca271e30808b3d683b6cae601ed90
xfs: get mp from bma->ip in xfs_bmap code

Source kernel commit f1f96c4946590616812711ac19eb7a84be160877

In my earlier commit

  c29aad4 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: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/xfs_bmap.c