diff options
-rw-r--r-- | fs/ntfs3/file.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index 6242708980d0..f8360f9bfaf0 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -661,7 +661,13 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len) /* * Normal file: Allocate clusters, do not change 'valid' size. */ - err = ntfs_set_size(inode, max(end, i_size)); + loff_t new_size = max(end, i_size); + + err = inode_newsize_ok(inode, new_size); + if (err) + goto out; + + err = ntfs_set_size(inode, new_size); if (err) goto out; |