diff options
Diffstat (limited to 'fs/hfs/inode.c')
-rw-r--r-- | fs/hfs/inode.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index bc835f272a6e..97f8446c4ff4 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c | |||
@@ -35,10 +35,14 @@ static int hfs_readpage(struct file *file, struct page *page) | |||
35 | return block_read_full_page(page, hfs_get_block); | 35 | return block_read_full_page(page, hfs_get_block); |
36 | } | 36 | } |
37 | 37 | ||
38 | static int hfs_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) | 38 | static int hfs_write_begin(struct file *file, struct address_space *mapping, |
39 | loff_t pos, unsigned len, unsigned flags, | ||
40 | struct page **pagep, void **fsdata) | ||
39 | { | 41 | { |
40 | return cont_prepare_write(page, from, to, hfs_get_block, | 42 | *pagep = NULL; |
41 | &HFS_I(page->mapping->host)->phys_size); | 43 | return cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata, |
44 | hfs_get_block, | ||
45 | &HFS_I(mapping->host)->phys_size); | ||
42 | } | 46 | } |
43 | 47 | ||
44 | static sector_t hfs_bmap(struct address_space *mapping, sector_t block) | 48 | static sector_t hfs_bmap(struct address_space *mapping, sector_t block) |
@@ -119,8 +123,8 @@ const struct address_space_operations hfs_btree_aops = { | |||
119 | .readpage = hfs_readpage, | 123 | .readpage = hfs_readpage, |
120 | .writepage = hfs_writepage, | 124 | .writepage = hfs_writepage, |
121 | .sync_page = block_sync_page, | 125 | .sync_page = block_sync_page, |
122 | .prepare_write = hfs_prepare_write, | 126 | .write_begin = hfs_write_begin, |
123 | .commit_write = generic_commit_write, | 127 | .write_end = generic_write_end, |
124 | .bmap = hfs_bmap, | 128 | .bmap = hfs_bmap, |
125 | .releasepage = hfs_releasepage, | 129 | .releasepage = hfs_releasepage, |
126 | }; | 130 | }; |
@@ -129,8 +133,8 @@ const struct address_space_operations hfs_aops = { | |||
129 | .readpage = hfs_readpage, | 133 | .readpage = hfs_readpage, |
130 | .writepage = hfs_writepage, | 134 | .writepage = hfs_writepage, |
131 | .sync_page = block_sync_page, | 135 | .sync_page = block_sync_page, |
132 | .prepare_write = hfs_prepare_write, | 136 | .write_begin = hfs_write_begin, |
133 | .commit_write = generic_commit_write, | 137 | .write_end = generic_write_end, |
134 | .bmap = hfs_bmap, | 138 | .bmap = hfs_bmap, |
135 | .direct_IO = hfs_direct_IO, | 139 | .direct_IO = hfs_direct_IO, |
136 | .writepages = hfs_writepages, | 140 | .writepages = hfs_writepages, |