aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-07-17 17:30:45 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2017-07-20 17:42:32 -0400
commit1e86eabe73b73c82e1110c746ed3ec6d5e1c0a0d (patch)
tree3ddac329b334e7c68f428cd816db71a5ecbb3edc
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
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: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
-rw-r--r--fs/xfs/libxfs/xfs_btree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
index 4da85fff69ad..e0bcc4a59efd 100644
--- a/fs/xfs/libxfs/xfs_btree.c
+++ b/fs/xfs/libxfs/xfs_btree.c
@@ -728,7 +728,8 @@ xfs_btree_firstrec(
728 * Get the block pointer for this level. 728 * Get the block pointer for this level.
729 */ 729 */
730 block = xfs_btree_get_block(cur, level, &bp); 730 block = xfs_btree_get_block(cur, level, &bp);
731 xfs_btree_check_block(cur, block, level, bp); 731 if (xfs_btree_check_block(cur, block, level, bp))
732 return 0;
732 /* 733 /*
733 * It's empty, there is no such record. 734 * It's empty, there is no such record.
734 */ 735 */
@@ -757,7 +758,8 @@ xfs_btree_lastrec(
757 * Get the block pointer for this level. 758 * Get the block pointer for this level.
758 */ 759 */
759 block = xfs_btree_get_block(cur, level, &bp); 760 block = xfs_btree_get_block(cur, level, &bp);
760 xfs_btree_check_block(cur, block, level, bp); 761 if (xfs_btree_check_block(cur, block, level, bp))
762 return 0;
761 /* 763 /*
762 * It's empty, there is no such record. 764 * It's empty, there is no such record.
763 */ 765 */