aboutsummaryrefslogtreecommitdiffstats
path: root/fs/qnx4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/qnx4/inode.c')
-rw-r--r--fs/qnx4/inode.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index 277575ddc05c..16829722be93 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -320,10 +320,19 @@ static int qnx4_write_begin(struct file *file, struct address_space *mapping,
320 struct page **pagep, void **fsdata) 320 struct page **pagep, void **fsdata)
321{ 321{
322 struct qnx4_inode_info *qnx4_inode = qnx4_i(mapping->host); 322 struct qnx4_inode_info *qnx4_inode = qnx4_i(mapping->host);
323 int ret;
324
323 *pagep = NULL; 325 *pagep = NULL;
324 return cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata, 326 ret = cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
325 qnx4_get_block, 327 qnx4_get_block,
326 &qnx4_inode->mmu_private); 328 &qnx4_inode->mmu_private);
329 if (unlikely(ret)) {
330 loff_t isize = mapping->host->i_size;
331 if (pos + len > isize)
332 vmtruncate(mapping->host, isize);
333 }
334
335 return ret;
327} 336}
328static sector_t qnx4_bmap(struct address_space *mapping, sector_t block) 337static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
329{ 338{