diff options
author | Nick Piggin <npiggin@suse.de> | 2007-10-16 04:25:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:57 -0400 |
commit | 82b9d1d0da8046088b0f505f92a97d12d9804613 (patch) | |
tree | de9d6f5a0fa7482a097bcf97152c25dedf68e19e /fs/ufs/inode.c | |
parent | 205c109a7a96d9a3d8ffe64c4068b70811fef5e8 (diff) |
ufs: convert to new aops
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ufs/inode.c')
-rw-r--r-- | fs/ufs/inode.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index f18b79122fa3..d84d4b0f4779 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -558,24 +558,39 @@ static int ufs_writepage(struct page *page, struct writeback_control *wbc) | |||
558 | { | 558 | { |
559 | return block_write_full_page(page,ufs_getfrag_block,wbc); | 559 | return block_write_full_page(page,ufs_getfrag_block,wbc); |
560 | } | 560 | } |
561 | |||
561 | static int ufs_readpage(struct file *file, struct page *page) | 562 | static int ufs_readpage(struct file *file, struct page *page) |
562 | { | 563 | { |
563 | return block_read_full_page(page,ufs_getfrag_block); | 564 | return block_read_full_page(page,ufs_getfrag_block); |
564 | } | 565 | } |
565 | static int ufs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) | 566 | |
567 | int __ufs_write_begin(struct file *file, struct address_space *mapping, | ||
568 | loff_t pos, unsigned len, unsigned flags, | ||
569 | struct page **pagep, void **fsdata) | ||
566 | { | 570 | { |
567 | return block_prepare_write(page,from,to,ufs_getfrag_block); | 571 | return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, |
572 | ufs_getfrag_block); | ||
568 | } | 573 | } |
574 | |||
575 | static int ufs_write_begin(struct file *file, struct address_space *mapping, | ||
576 | loff_t pos, unsigned len, unsigned flags, | ||
577 | struct page **pagep, void **fsdata) | ||
578 | { | ||
579 | *pagep = NULL; | ||
580 | return __ufs_write_begin(file, mapping, pos, len, flags, pagep, fsdata); | ||
581 | } | ||
582 | |||
569 | static sector_t ufs_bmap(struct address_space *mapping, sector_t block) | 583 | static sector_t ufs_bmap(struct address_space *mapping, sector_t block) |
570 | { | 584 | { |
571 | return generic_block_bmap(mapping,block,ufs_getfrag_block); | 585 | return generic_block_bmap(mapping,block,ufs_getfrag_block); |
572 | } | 586 | } |
587 | |||
573 | const struct address_space_operations ufs_aops = { | 588 | const struct address_space_operations ufs_aops = { |
574 | .readpage = ufs_readpage, | 589 | .readpage = ufs_readpage, |
575 | .writepage = ufs_writepage, | 590 | .writepage = ufs_writepage, |
576 | .sync_page = block_sync_page, | 591 | .sync_page = block_sync_page, |
577 | .prepare_write = ufs_prepare_write, | 592 | .write_begin = ufs_write_begin, |
578 | .commit_write = generic_commit_write, | 593 | .write_end = generic_write_end, |
579 | .bmap = ufs_bmap | 594 | .bmap = ufs_bmap |
580 | }; | 595 | }; |
581 | 596 | ||