mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: remove all *_ITER_ABORT values
Use -ECANCELED to signal "stop iterating" instead of these magical *_ITER_ABORT values, since it's duplicative. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
7f313eda8f
commit
e7ee96dfb8
15 changed files with 54 additions and 44 deletions
|
@ -4598,7 +4598,7 @@ xfs_btree_simple_query_range(
|
|||
|
||||
/* Callback */
|
||||
error = fn(cur, recp, priv);
|
||||
if (error < 0 || error == XFS_BTREE_QUERY_RANGE_ABORT)
|
||||
if (error)
|
||||
break;
|
||||
|
||||
advloop:
|
||||
|
@ -4700,8 +4700,7 @@ pop_up:
|
|||
*/
|
||||
if (ldiff >= 0 && hdiff >= 0) {
|
||||
error = fn(cur, recp, priv);
|
||||
if (error < 0 ||
|
||||
error == XFS_BTREE_QUERY_RANGE_ABORT)
|
||||
if (error)
|
||||
break;
|
||||
} else if (hdiff < 0) {
|
||||
/* Record is larger than high key; pop. */
|
||||
|
@ -4772,8 +4771,7 @@ out:
|
|||
* Query a btree for all records overlapping a given interval of keys. The
|
||||
* supplied function will be called with each record found; return one of the
|
||||
* XFS_BTREE_QUERY_RANGE_{CONTINUE,ABORT} values or the usual negative error
|
||||
* code. This function returns XFS_BTREE_QUERY_RANGE_ABORT, zero, or a
|
||||
* negative error code.
|
||||
* code. This function returns -ECANCELED, zero, or a negative error code.
|
||||
*/
|
||||
int
|
||||
xfs_btree_query_range(
|
||||
|
@ -4889,7 +4887,7 @@ xfs_btree_has_record_helper(
|
|||
union xfs_btree_rec *rec,
|
||||
void *priv)
|
||||
{
|
||||
return XFS_BTREE_QUERY_RANGE_ABORT;
|
||||
return -ECANCELED;
|
||||
}
|
||||
|
||||
/* Is there a record covering a given range of keys? */
|
||||
|
@ -4904,7 +4902,7 @@ xfs_btree_has_record(
|
|||
|
||||
error = xfs_btree_query_range(cur, low, high,
|
||||
&xfs_btree_has_record_helper, NULL);
|
||||
if (error == XFS_BTREE_QUERY_RANGE_ABORT) {
|
||||
if (error == -ECANCELED) {
|
||||
*exists = true;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue