summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 0475693bc199..abcbd0c95b30 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -283,12 +283,11 @@ xfs_rtallocate_extent_block(
/*
* If not done yet, find the start of the next free space.
*/
- if (next < end) {
- error = xfs_rtfind_forw(args, next, end, &i);
- if (error)
- return error;
- } else
+ if (next >= end)
break;
+ error = xfs_rtfind_forw(args, next, end, &i);
+ if (error)
+ return error;
}
/*
* Searched the whole thing & didn't find a maxlen free extent.