You need to sign in or sign up before continuing.
提交 1e86eabe 编写于 作者: D Darrick J. Wong

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: NDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
上级 5771a8c0
...@@ -728,7 +728,8 @@ xfs_btree_firstrec( ...@@ -728,7 +728,8 @@ xfs_btree_firstrec(
* Get the block pointer for this level. * Get the block pointer for this level.
*/ */
block = xfs_btree_get_block(cur, level, &bp); 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. * It's empty, there is no such record.
*/ */
...@@ -757,7 +758,8 @@ xfs_btree_lastrec( ...@@ -757,7 +758,8 @@ xfs_btree_lastrec(
* Get the block pointer for this level. * Get the block pointer for this level.
*/ */
block = xfs_btree_get_block(cur, level, &bp); 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. * It's empty, there is no such record.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册