Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e86eabe authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

xfs: check _btree_check_block value



Check the _btree_check_block return value for the firstrec and lastrec
functions, since we have the ability to signal that the repositioning
did not succeed.

Fixes-coverity-id: 114067
Fixes-coverity-id: 114068
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
parent 5771a8c0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -728,7 +728,8 @@ xfs_btree_firstrec(
	 * Get the block pointer for this level.
	 */
	block = xfs_btree_get_block(cur, level, &bp);
	xfs_btree_check_block(cur, block, level, bp);
	if (xfs_btree_check_block(cur, block, level, bp))
		return 0;
	/*
	 * It's empty, there is no such record.
	 */
@@ -757,7 +758,8 @@ xfs_btree_lastrec(
	 * Get the block pointer for this level.
	 */
	block = xfs_btree_get_block(cur, level, &bp);
	xfs_btree_check_block(cur, block, level, bp);
	if (xfs_btree_check_block(cur, block, level, bp))
		return 0;
	/*
	 * It's empty, there is no such record.
	 */