[XFS] fix logic error in xfs_alloc_ag_vextent_near()
authorDavid Chinner <dgc@sgi.com>
Thu, 17 Apr 2008 06:49:49 +0000 (16:49 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 18 Apr 2008 02:03:02 +0000 (12:03 +1000)
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: David Chinner <dgc@sgi.com>
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_alloc.c

index facdae14edd0c6201ee98997513cd7de0d45dfa6..1956f83489f1b8378f4459844e422547d421e0ec 100644 (file)
@@ -838,7 +838,7 @@ xfs_alloc_ag_vextent_near(
                        XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
                        xfs_alloc_compute_aligned(ltbno, ltlen, args->alignment,
                                        args->minlen, &ltbnoa, &ltlena);
-                       if (ltlena >= args->minlen)
+                       if (ltlena < args->minlen)
                                continue;
                        args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen);
                        xfs_alloc_fix_len(args);