aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/inode.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-10-16 04:25:04 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:55 -0400
commitf34fb6eccc962e4137b77c4bbe1e9a31d27a30e6 (patch)
tree58fd363d892ee2d341a17e52a297632a10219af9 /fs/ext2/inode.c
parent6272b5a5868f3d5fbf9815f9984891ced343dabc (diff)
ext2: convert to new aops
Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r--fs/ext2/inode.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 0079b2cd5314..63ab02aa4c52 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -642,18 +642,21 @@ ext2_readpages(struct file *file, struct address_space *mapping,
642 return mpage_readpages(mapping, pages, nr_pages, ext2_get_block); 642 return mpage_readpages(mapping, pages, nr_pages, ext2_get_block);
643} 643}
644 644
645static int 645int __ext2_write_begin(struct file *file, struct address_space *mapping,
646ext2_prepare_write(struct file *file, struct page *page, 646 loff_t pos, unsigned len, unsigned flags,
647 unsigned from, unsigned to) 647 struct page **pagep, void **fsdata)
648{ 648{
649 return block_prepare_write(page,from,to,ext2_get_block); 649 return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
650 ext2_get_block);
650} 651}
651 652
652static int 653static int
653ext2_nobh_prepare_write(struct file *file, struct page *page, 654ext2_write_begin(struct file *file, struct address_space *mapping,
654 unsigned from, unsigned to) 655 loff_t pos, unsigned len, unsigned flags,
656 struct page **pagep, void **fsdata)
655{ 657{
656 return nobh_prepare_write(page,from,to,ext2_get_block); 658 *pagep = NULL;
659 return __ext2_write_begin(file, mapping, pos, len, flags, pagep,fsdata);
657} 660}
658 661
659static int ext2_nobh_writepage(struct page *page, 662static int ext2_nobh_writepage(struct page *page,
@@ -689,8 +692,8 @@ const struct address_space_operations ext2_aops = {
689 .readpages = ext2_readpages, 692 .readpages = ext2_readpages,
690 .writepage = ext2_writepage, 693 .writepage = ext2_writepage,
691 .sync_page = block_sync_page, 694 .sync_page = block_sync_page,
692 .prepare_write = ext2_prepare_write, 695 .write_begin = ext2_write_begin,
693 .commit_write = generic_commit_write, 696 .write_end = generic_write_end,
694 .bmap = ext2_bmap, 697 .bmap = ext2_bmap,
695 .direct_IO = ext2_direct_IO, 698 .direct_IO = ext2_direct_IO,
696 .writepages = ext2_writepages, 699 .writepages = ext2_writepages,
@@ -707,8 +710,7 @@ const struct address_space_operations ext2_nobh_aops = {
707 .readpages = ext2_readpages, 710 .readpages = ext2_readpages,
708 .writepage = ext2_nobh_writepage, 711 .writepage = ext2_nobh_writepage,
709 .sync_page = block_sync_page, 712 .sync_page = block_sync_page,
710 .prepare_write = ext2_nobh_prepare_write, 713 /* XXX: todo */
711 .commit_write = nobh_commit_write,
712 .bmap = ext2_bmap, 714 .bmap = ext2_bmap,
713 .direct_IO = ext2_direct_IO, 715 .direct_IO = ext2_direct_IO,
714 .writepages = ext2_writepages, 716 .writepages = ext2_writepages,