diff options
author | Nick Piggin <npiggin@suse.de> | 2007-10-16 04:25:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:57 -0400 |
commit | d5c5f84ba9b9138b03ba90f1b7f83a379cfaea6a (patch) | |
tree | 6b4ec3492101c30de0b1062e20543063cbb16cad | |
parent | 4a66af9eaa9531372cfcb9e20103ed147c729ff9 (diff) |
jfs: convert to new aops
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/jfs/inode.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 3467dde27e5a..6af378563611 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -255,7 +255,7 @@ int jfs_get_block(struct inode *ip, sector_t lblock, | |||
255 | 255 | ||
256 | static int jfs_writepage(struct page *page, struct writeback_control *wbc) | 256 | static int jfs_writepage(struct page *page, struct writeback_control *wbc) |
257 | { | 257 | { |
258 | return nobh_writepage(page, jfs_get_block, wbc); | 258 | return block_write_full_page(page, jfs_get_block, wbc); |
259 | } | 259 | } |
260 | 260 | ||
261 | static int jfs_writepages(struct address_space *mapping, | 261 | static int jfs_writepages(struct address_space *mapping, |
@@ -275,10 +275,13 @@ static int jfs_readpages(struct file *file, struct address_space *mapping, | |||
275 | return mpage_readpages(mapping, pages, nr_pages, jfs_get_block); | 275 | return mpage_readpages(mapping, pages, nr_pages, jfs_get_block); |
276 | } | 276 | } |
277 | 277 | ||
278 | static int jfs_prepare_write(struct file *file, | 278 | static int jfs_write_begin(struct file *file, struct address_space *mapping, |
279 | struct page *page, unsigned from, unsigned to) | 279 | loff_t pos, unsigned len, unsigned flags, |
280 | struct page **pagep, void **fsdata) | ||
280 | { | 281 | { |
281 | return nobh_prepare_write(page, from, to, jfs_get_block); | 282 | *pagep = NULL; |
283 | return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, | ||
284 | jfs_get_block); | ||
282 | } | 285 | } |
283 | 286 | ||
284 | static sector_t jfs_bmap(struct address_space *mapping, sector_t block) | 287 | static sector_t jfs_bmap(struct address_space *mapping, sector_t block) |
@@ -302,8 +305,8 @@ const struct address_space_operations jfs_aops = { | |||
302 | .writepage = jfs_writepage, | 305 | .writepage = jfs_writepage, |
303 | .writepages = jfs_writepages, | 306 | .writepages = jfs_writepages, |
304 | .sync_page = block_sync_page, | 307 | .sync_page = block_sync_page, |
305 | .prepare_write = jfs_prepare_write, | 308 | .write_begin = jfs_write_begin, |
306 | .commit_write = nobh_commit_write, | 309 | .write_end = generic_write_end, |
307 | .bmap = jfs_bmap, | 310 | .bmap = jfs_bmap, |
308 | .direct_IO = jfs_direct_IO, | 311 | .direct_IO = jfs_direct_IO, |
309 | }; | 312 | }; |
@@ -356,7 +359,7 @@ void jfs_truncate(struct inode *ip) | |||
356 | { | 359 | { |
357 | jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); | 360 | jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); |
358 | 361 | ||
359 | nobh_truncate_page(ip->i_mapping, ip->i_size); | 362 | block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); |
360 | 363 | ||
361 | IWRITE_LOCK(ip, RDWRLOCK_NORMAL); | 364 | IWRITE_LOCK(ip, RDWRLOCK_NORMAL); |
362 | jfs_truncate_nolock(ip, ip->i_size); | 365 | jfs_truncate_nolock(ip, ip->i_size); |