Commit e6430037 authored by David Chinner's avatar David Chinner Committed by Lachlan McIlroy

[XFS] fix logic error in xfs_alloc_ag_vextent_near()

Fix a logic error in xfs_alloc_ag_vextent_near(). This is a regression
introduced by the error handling changes.

SGI-PV: 890084
SGI-Modid: xfs-linux-melb:xfs-kern:30838a
Signed-off-by: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarBarry Naujok <bnaujok@sgi.com>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
parent d4055947
...@@ -838,7 +838,7 @@ xfs_alloc_ag_vextent_near( ...@@ -838,7 +838,7 @@ xfs_alloc_ag_vextent_near(
XFS_WANT_CORRUPTED_GOTO(i == 1, error0); XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
xfs_alloc_compute_aligned(ltbno, ltlen, args->alignment, xfs_alloc_compute_aligned(ltbno, ltlen, args->alignment,
args->minlen, &ltbnoa, &ltlena); args->minlen, &ltbnoa, &ltlena);
if (ltlena >= args->minlen) if (ltlena < args->minlen)
continue; continue;
args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen); args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen);
xfs_alloc_fix_len(args); xfs_alloc_fix_len(args);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment