mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
xfs: check _btree_check_block value
commit 1e86eabe73 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e76496fa85
commit
a6247b0189
@@ -714,7 +714,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.
|
||||
*/
|
||||
@@ -743,7 +744,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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user