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>
This commit is contained in:
Christoph Hellwig 2023-12-18 05:57:28 +01:00 committed by Chandan Babu R
parent b271b31411
commit f3e509dd45

View File

@ -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.