diff options
| author | Christoph Hellwig <[email protected]> | 2023-12-18 04:57:28 +0000 |
|---|---|---|
| committer | Chandan Babu R <[email protected]> | 2023-12-22 05:48:12 +0000 |
| commit | f3e509dd45c226aff268bab3695fded60e18f720 (patch) | |
| tree | b25c35ca6e070e4d526d80dd657e288c7cc06417 /fs/xfs/xfs_rtalloc.c | |
| parent | xfs: split xfs_rtmodify_summary_int (diff) | |
| download | kernel-f3e509dd45c226aff268bab3695fded60e18f720.tar.gz kernel-f3e509dd45c226aff268bab3695fded60e18f720.zip | |
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 <[email protected]>
Reviewed-by: "Darrick J. Wong" <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
| -rw-r--r-- | fs/xfs/xfs_rtalloc.c | 9 |
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. |
