From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: [patch 4/5] ext2: convert to new aops Date: Wed, 14 Mar 2007 14:38:46 +0100 (CET) Message-ID: <20070314112603.13798.75394.sendpatchset@linux.site> References: <20070314112529.13798.35417.sendpatchset@linux.site> Cc: Linux Kernel , Christoph Hellwig , Nick Piggin , Andrew Morton , Mark Fasheh To: Linux Filesystems Return-path: In-Reply-To: <20070314112529.13798.35417.sendpatchset@linux.site> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Implement new aops for ext2. fs/ext2/inode.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) Index: linux-2.6/fs/ext2/inode.c =================================================================== --- linux-2.6.orig/fs/ext2/inode.c +++ linux-2.6/fs/ext2/inode.c @@ -643,6 +643,16 @@ ext2_readpages(struct file *file, struct } static int +ext2_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, int intr, + struct page **pagep, void **fsdata) +{ + *pagep = NULL; + return block_write_begin(file, mapping, pos, len, intr, pagep, fsdata, + ext2_get_block); +} + +static int ext2_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) { @@ -689,6 +699,8 @@ const struct address_space_operations ex .readpages = ext2_readpages, .writepage = ext2_writepage, .sync_page = block_sync_page, + .write_begin = ext2_write_begin, + .write_end = block_write_end, .prepare_write = ext2_prepare_write, .commit_write = generic_commit_write, .bmap = ext2_bmap,