From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: with ECARTIS (v1.0.0; list xfs); Wed, 09 Apr 2008 20:25:33 -0700 (PDT) Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with SMTP id m3A3PMhb022567 for ; Wed, 9 Apr 2008 20:25:25 -0700 Date: Thu, 10 Apr 2008 13:25:55 +1000 From: David Chinner Subject: [patch] fix logic error in xfs_alloc_ag_vextent_near() Message-ID: <20080410032555.GS108924158@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com List-Id: xfs To: xfs-dev Cc: xfs-oss Fix a logic error in xfs_alloc_ag_vextent_near(). This is a regression introduced by the error handling changes. Signed-off-by: Dave Chinner --- fs/xfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_alloc.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_alloc.c 2008-04-10 10:00:50.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_alloc.c 2008-04-10 13:10:17.948126881 +1000 @@ -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, <bnoa, <lena); - if (ltlena >= args->minlen) + if (ltlena < args->minlen) continue; args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen); xfs_alloc_fix_len(args);