aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysv/itree.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-10-16 04:25:21 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:57 -0400
commit26a6441aadde864132672750b3cf0892e5acaaf4 (patch)
tree2e85db7e46c956f5e0d7150e09accb67235983b6 /fs/sysv/itree.c
parentbe021ee41a8b65d181fe22799de6be62adf72efb (diff)
sysv: convert to new aops
Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysv/itree.c')
-rw-r--r--fs/sysv/itree.c23
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
456static int sysv_readpage(struct file *file, struct page *page) 457static 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}
460static int sysv_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) 461
462int __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
470static 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
464static sector_t sysv_bmap(struct address_space *mapping, sector_t block) 478static 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
468const struct address_space_operations sysv_aops = { 483const 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};