Skip to content

Commit f3e509d

Browse files
Christoph HellwigChandan Babu R
authored andcommitted
xfs: invert a check in xfs_rtallocate_extent_block
Doing a break in the else side of a conditional is rather silly. Invert the check, break ASAP and unindent the other leg. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 parent b271b31 commit f3e509d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/xfs/xfs_rtalloc.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,11 @@ xfs_rtallocate_extent_block(
283283
/*
284284
* If not done yet, find the start of the next free space.
285285
*/
286-
if (next < end) {
287-
error = xfs_rtfind_forw(args, next, end, &i);
288-
if (error)
289-
return error;
290-
} else
286+
if (next >= end)
291287
break;
288+
error = xfs_rtfind_forw(args, next, end, &i);
289+
if (error)
290+
return error;
292291
}
293292
/*
294293
* Searched the whole thing & didn't find a maxlen free extent.

0 commit comments

Comments
 (0)