From mboxrd@z Thu Jan 1 00:00:00 1970 From: npiggin@suse.de Subject: [patch 27/41] qnx4 convert to new aops. Date: Fri, 25 May 2007 22:22:11 +1000 Message-ID: <20070524053157.372960000@linux.local0.net> References: <20070524052844.860329000@suse.de> Cc: linux-fsdevel@vger.kernel.org, Mark Fasheh , al@alarsen.net To: Andrew Morton Return-path: Received: from ns1.suse.de ([195.135.220.2]:40193 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756682AbXEYMh0 (ORCPT ); Fri, 25 May 2007 08:37:26 -0400 Content-Disposition: inline; filename=fs-qnx4-aops.patch Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Cc: al@alarsen.net Cc: Linux Filesystems Signed-off-by: Nick Piggin fs/qnx4/inode.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) Index: linux-2.6/fs/qnx4/inode.c =================================================================== --- linux-2.6.orig/fs/qnx4/inode.c +++ linux-2.6/fs/qnx4/inode.c @@ -433,16 +433,21 @@ static int qnx4_writepage(struct page *p { return block_write_full_page(page,qnx4_get_block, wbc); } + static int qnx4_readpage(struct file *file, struct page *page) { return block_read_full_page(page,qnx4_get_block); } -static int qnx4_prepare_write(struct file *file, struct page *page, - unsigned from, unsigned to) -{ - struct qnx4_inode_info *qnx4_inode = qnx4_i(page->mapping->host); - return cont_prepare_write(page, from, to, qnx4_get_block, - &qnx4_inode->mmu_private); + +static int qnx4_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata) +{ + struct qnx4_inode_info *qnx4_inode = qnx4_i(mapping->host); + *pagep = NULL; + return cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata, + qnx4_get_block, + &qnx4_inode->mmu_private); } static sector_t qnx4_bmap(struct address_space *mapping, sector_t block) { @@ -452,8 +457,8 @@ static const struct address_space_operat .readpage = qnx4_readpage, .writepage = qnx4_writepage, .sync_page = block_sync_page, - .prepare_write = qnx4_prepare_write, - .commit_write = generic_commit_write, + .write_begin = qnx4_write_begin, + .write_end = generic_write_end, .bmap = qnx4_bmap }; --