]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: get mp from bma->ip in xfs_bmap code
authorEric Sandeen <sandeen@redhat.com>
Mon, 4 Jan 2016 05:10:42 +0000 (16:10 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 4 Jan 2016 05:10:42 +0000 (16:10 +1100)
commit7a861b05847039758c008639c5f17a620cff2c07
tree59ea2d205fb21e5ef7e1813164e52c6c258d2c1e
parentb2f93bd0a7560def04fe48d101c9d1f6131d31fb
xfs: get mp from bma->ip in xfs_bmap code

In my earlier commit

  48349b0 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>
fs/xfs/libxfs/xfs_bmap.c