xfs: check for obviously bad level values in the bmbt root
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Feb 2017 23:13:59 +0000 (15:13 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Feb 2017 23:13:59 +0000 (15:13 -0800)
commitb3bf607d58520ea8c0666aeb4be60dbb724cd3a2
tree56e86f190cb9513c8e23d670e9637f87217b10f3
parentd5a91baeb6033c3392121e4d5c011cdc08dfa9f7
xfs: check for obviously bad level values in the bmbt root

We can't handle a bmbt that's taller than BTREE_MAXLEVELS, and there's
no such thing as a zero-level bmbt (for that we have extents format),
so if we see this, send back an error code.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_inode_fork.c