aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-06-04 05:29:54 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:47:30 -0400
commitea0f04e59543bafb3d2cbe37a0d375acb0bb2c34 (patch)
tree66a400f5b8e9a01acb72107c72e504325af6fe67 /fs/jfs
parenteafdc7d190a944c755a9fe68573c193e6e0217e7 (diff)
get rid of nobh_write_begin_newtrunc
Move the call to vmtruncate to get rid of accessive blocks to the only remaining caller and rename the non-truncating version to nobh_write_begin. Get rid of the superflous file argument to it while we're at it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/inode.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 79e6cda28181..c38dc1806281 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -303,8 +303,17 @@ static int jfs_write_begin(struct file *file, struct address_space *mapping,
303 loff_t pos, unsigned len, unsigned flags, 303 loff_t pos, unsigned len, unsigned flags,
304 struct page **pagep, void **fsdata) 304 struct page **pagep, void **fsdata)
305{ 305{
306 return nobh_write_begin(file, mapping, pos, len, flags, pagep, fsdata, 306 int ret;
307
308 ret = nobh_write_begin(mapping, pos, len, flags, pagep, fsdata,
307 jfs_get_block); 309 jfs_get_block);
310 if (unlikely(ret)) {
311 loff_t isize = mapping->host->i_size;
312 if (pos + len > isize)
313 vmtruncate(mapping->host, isize);
314 }
315
316 return ret;
308} 317}
309 318
310static sector_t jfs_bmap(struct address_space *mapping, sector_t block) 319static sector_t jfs_bmap(struct address_space *mapping, sector_t block)