]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix btree scrub deref check
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Nov 2017 20:09:29 +0000 (12:09 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 9 Nov 2017 17:10:45 +0000 (09:10 -0800)
commit8d173765ac6078ec7b2c934e7979f94d4d3d6709
tree288ea5b1045bef9c662774a7d81bd8b85b49b5b3
parentc4e66894a7cb0b8fd96e5bc33c134912e97d8c88
xfs: fix btree scrub deref check

The btree scrubber has some custom code to retrieve and check a btree
block via xfs_btree_lookup_get_block.  This function will either return
an error code (verifiers failed) or a *pblock will be untouched (bad
pointer).  Since we previously set *pblock to NULL, we need to check
*pblock, not pblock, to trigger the early bailout.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/btree.c