Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755431AbXFUF0l (ORCPT ); Thu, 21 Jun 2007 01:26:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751586AbXFUF0b (ORCPT ); Thu, 21 Jun 2007 01:26:31 -0400 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:58693 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751463AbXFUF0a (ORCPT ); Thu, 21 Jun 2007 01:26:30 -0400 Date: Wed, 20 Jun 2007 22:26:27 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Bob Picco cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Mel Gorman , William Lee Irwin III , David Chinner , Jens Axboe , Badari Pulavarty , Maxim Levitsky Subject: Re: [31/37] Large blocksize support: Core piece In-Reply-To: <20070621002013.GC10927@localhost> Message-ID: References: <20070620182907.506775016@sgi.com> <20070620183013.224208780@sgi.com> <20070621002013.GC10927@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 610 Lines: 19 On Wed, 20 Jun 2007, Bob Picco wrote: > > + if (size > (PAGE_SIZE << MAX_ORDER) || size < 512 || > > + !is_power_of_2(size)) > I think this should be: > if (size > (MAX_ORDER_NR_PAGES << PAGE_SHIFT) ... > or > if (size > (PAGE_SIZE << (MAX_ORDER - 1)) ... > bob > > return -EINVAL; Right.... MAX_ORDER is the first illegal order not the last usable. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/