From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: Re: [patch 01/19] Define functions for page cache handling Date: Wed, 28 Nov 2007 19:21:42 -0800 (PST) Message-ID: References: <20071129011052.866354847@sgi.com> <20071129011144.503535436@sgi.com> <20071129030645.GE115527101@sgi.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , Mel Gorman , William Lee Irwin III , Jens Axboe , Badari Pulavarty , Maxim Levitsky , Fengguang Wu , swin wang , totty.lu@gmail.com, hugh@veritas.com, joern@lazybastard.org To: David Chinner Return-path: Received: from relay1.sgi.com ([192.48.171.29]:44951 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756842AbXK2DVo (ORCPT ); Wed, 28 Nov 2007 22:21:44 -0500 In-Reply-To: <20071129030645.GE115527101@sgi.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 29 Nov 2007, David Chinner wrote: > On Wed, Nov 28, 2007 at 05:10:53PM -0800, Christoph Lameter wrote: > > +/* > > + * Index of the page starting on or after the given position. > > + */ > > +static inline pgoff_t page_cache_next(struct address_space *a, > > + loff_t pos) > > +{ > > + return page_cache_index(a, pos + page_cache_size(a) - 1); > > return page_cache_index(a, pos + page_cache_mask(a)); Na that is confusing. We really want to go to one byte before the end of the page.