aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-10-16 04:25:25 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:58 -0400
commit03158cd7eb3374843de68421142ca5900df845d9 (patch)
tree5e1bfc1f981651e7f7d7cf30afd15d7bd96b2a57 /fs/jfs
parentb6af1bcd8720cb3062c8c4d4c8ba02bee10ff03f (diff)
fs: restore nobh
Implement nobh in new aops. This is a bit tricky. FWIW, nobh_truncate is now implemented in a way that does not create blocks in sparse regions, which is a silly thing for it to have been doing (isn't it?) ext2 survives fsx and fsstress. jfs is converted as well... ext3 should be easy to do (but not done yet). [akpm@linux-foundation.org: coding-style fixes] Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/inode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 6af378563611..4672013802e1 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -279,8 +279,7 @@ static int jfs_write_begin(struct file *file, struct address_space *mapping,
279 loff_t pos, unsigned len, unsigned flags, 279 loff_t pos, unsigned len, unsigned flags,
280 struct page **pagep, void **fsdata) 280 struct page **pagep, void **fsdata)
281{ 281{
282 *pagep = NULL; 282 return nobh_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
283 return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
284 jfs_get_block); 283 jfs_get_block);
285} 284}
286 285
@@ -306,7 +305,7 @@ const struct address_space_operations jfs_aops = {
306 .writepages = jfs_writepages, 305 .writepages = jfs_writepages,
307 .sync_page = block_sync_page, 306 .sync_page = block_sync_page,
308 .write_begin = jfs_write_begin, 307 .write_begin = jfs_write_begin,
309 .write_end = generic_write_end, 308 .write_end = nobh_write_end,
310 .bmap = jfs_bmap, 309 .bmap = jfs_bmap,
311 .direct_IO = jfs_direct_IO, 310 .direct_IO = jfs_direct_IO,
312}; 311};
@@ -359,7 +358,7 @@ void jfs_truncate(struct inode *ip)
359{ 358{
360 jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); 359 jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size);
361 360
362 block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); 361 nobh_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block);
363 362
364 IWRITE_LOCK(ip, RDWRLOCK_NORMAL); 363 IWRITE_LOCK(ip, RDWRLOCK_NORMAL);
365 jfs_truncate_nolock(ip, ip->i_size); 364 jfs_truncate_nolock(ip, ip->i_size);