xfs: filter out obviously bad btree pointers
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Feb 2017 23:13:58 +0000 (15:13 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Feb 2017 23:13:58 +0000 (15:13 -0800)
commitd5a91baeb6033c3392121e4d5c011cdc08dfa9f7
treef8a831534ecc6270b9cf57164de9e881b46ce02c
parent7a652bbe366464267190c2792a32ce4fff5595ef
xfs: filter out obviously bad btree pointers

Don't let anybody load an obviously bad btree pointer.  Since the values
come from disk, we must return an error, not just ASSERT.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.h