diff options
Diffstat (limited to 'fs/sysv/itree.c')
-rw-r--r-- | fs/sysv/itree.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c index f2bcccd1d6fc..f042eec464c2 100644 --- a/fs/sysv/itree.c +++ b/fs/sysv/itree.c | |||
@@ -453,23 +453,38 @@ static int sysv_writepage(struct page *page, struct writeback_control *wbc) | |||
453 | { | 453 | { |
454 | return block_write_full_page(page,get_block,wbc); | 454 | return block_write_full_page(page,get_block,wbc); |
455 | } | 455 | } |
456 | |||
456 | static int sysv_readpage(struct file *file, struct page *page) | 457 | static int sysv_readpage(struct file *file, struct page *page) |
457 | { | 458 | { |
458 | return block_read_full_page(page,get_block); | 459 | return block_read_full_page(page,get_block); |
459 | } | 460 | } |
460 | static int sysv_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) | 461 | |
462 | int __sysv_write_begin(struct file *file, struct address_space *mapping, | ||
463 | loff_t pos, unsigned len, unsigned flags, | ||
464 | struct page **pagep, void **fsdata) | ||
461 | { | 465 | { |
462 | return block_prepare_write(page,from,to,get_block); | 466 | return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, |
467 | get_block); | ||
463 | } | 468 | } |
469 | |||
470 | static int sysv_write_begin(struct file *file, struct address_space *mapping, | ||
471 | loff_t pos, unsigned len, unsigned flags, | ||
472 | struct page **pagep, void **fsdata) | ||
473 | { | ||
474 | *pagep = NULL; | ||
475 | return __sysv_write_begin(file, mapping, pos, len, flags, pagep, fsdata); | ||
476 | } | ||
477 | |||
464 | static sector_t sysv_bmap(struct address_space *mapping, sector_t block) | 478 | static sector_t sysv_bmap(struct address_space *mapping, sector_t block) |
465 | { | 479 | { |
466 | return generic_block_bmap(mapping,block,get_block); | 480 | return generic_block_bmap(mapping,block,get_block); |
467 | } | 481 | } |
482 | |||
468 | const struct address_space_operations sysv_aops = { | 483 | const struct address_space_operations sysv_aops = { |
469 | .readpage = sysv_readpage, | 484 | .readpage = sysv_readpage, |
470 | .writepage = sysv_writepage, | 485 | .writepage = sysv_writepage, |
471 | .sync_page = block_sync_page, | 486 | .sync_page = block_sync_page, |
472 | .prepare_write = sysv_prepare_write, | 487 | .write_begin = sysv_write_begin, |
473 | .commit_write = generic_commit_write, | 488 | .write_end = generic_write_end, |
474 | .bmap = sysv_bmap | 489 | .bmap = sysv_bmap |
475 | }; | 490 | }; |