From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 5/6] introduce __block_write_begin Date: Wed, 2 Jun 2010 01:39:50 +0200 Message-ID: <20100601233950.GF8137@quack.suse.cz> References: <20100530204932.GA21002@lst.de> <20100530205018.GF21002@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@zeniv.linux.org.uk, npiggin@suse.de, jack@suse.cz, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from cantor2.suse.de ([195.135.220.15]:39636 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755270Ab0FAXkF (ORCPT ); Tue, 1 Jun 2010 19:40:05 -0400 Content-Disposition: inline In-Reply-To: <20100530205018.GF21002@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun 30-05-10 22:50:18, Christoph Hellwig wrote: > Split up the block_write_begin implementation - __block_write_begin is a new > trivial wrapper for block_prepare_write that always takes an already > allocated page and can be either called from block_write_begin or filesystem > code that already has a page allocated. Remove the handling of already > allocated pages from block_write_begin after switching all callers that > do it to __block_write_begin. > > Signed-off-by: Christoph Hellwig > > Index: linux-2.6/fs/buffer.c > =================================================================== > --- linux-2.6.orig/fs/buffer.c 2010-05-30 22:32:22.754253961 +0200 > +++ linux-2.6/fs/buffer.c 2010-05-30 22:40:16.496254519 +0200 > @@ -1833,9 +1833,10 @@ void page_zero_new_buffers(struct page * > } > EXPORT_SYMBOL(page_zero_new_buffers); > > -static int __block_prepare_write(struct inode *inode, struct page *page, > - unsigned from, unsigned to, get_block_t *get_block) > +int block_prepare_write(struct page *page, unsigned from, unsigned to, > + get_block_t *get_block) > { > + struct inode *inode = page->mapping->host; This new variable doesn't seem to be used... Honza -- Jan Kara SUSE Labs, CR