diff options
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 | ||