diff options
author | Nick Piggin <npiggin@suse.de> | 2007-10-16 01:25:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 09:42:58 -0700 |
commit | 03158cd7eb3374843de68421142ca5900df845d9 (patch) | |
tree | 5e1bfc1f981651e7f7d7cf30afd15d7bd96b2a57 /fs/jfs/inode.c | |
parent | b6af1bcd8720cb3062c8c4d4c8ba02bee10ff03f (diff) | |
download | linux-03158cd7eb3374843de68421142ca5900df845d9.tar.bz2 |
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/inode.c')
-rw-r--r-- | fs/jfs/inode.c | 7 |
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, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) { - *pagep = NULL; - return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, + return nobh_write_begin(file, mapping, pos, len, flags, pagep, fsdata, jfs_get_block); } @@ -306,7 +305,7 @@ const struct address_space_operations jfs_aops = { .writepages = jfs_writepages, .sync_page = block_sync_page, .write_begin = jfs_write_begin, - .write_end = generic_write_end, + .write_end = nobh_write_end, .bmap = jfs_bmap, .direct_IO = jfs_direct_IO, }; @@ -359,7 +358,7 @@ void jfs_truncate(struct inode *ip) { jfs_info("jfs_truncate: size = 0x%lx", (ulong) ip->i_size); - block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); + nobh_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block); IWRITE_LOCK(ip, RDWRLOCK_NORMAL); jfs_truncate_nolock(ip, ip->i_size); |