diff options
Diffstat (limited to 'fs/hpfs/inode.c')
-rw-r--r-- | fs/hpfs/inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index 804a9a842cbc..5dc06c837105 100644 --- a/fs/hpfs/inode.c +++ b/fs/hpfs/inode.c | |||
@@ -277,9 +277,12 @@ int hpfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
277 | 277 | ||
278 | if ((attr->ia_valid & ATTR_SIZE) && | 278 | if ((attr->ia_valid & ATTR_SIZE) && |
279 | attr->ia_size != i_size_read(inode)) { | 279 | attr->ia_size != i_size_read(inode)) { |
280 | error = vmtruncate(inode, attr->ia_size); | 280 | error = inode_newsize_ok(inode, attr->ia_size); |
281 | if (error) | 281 | if (error) |
282 | goto out_unlock; | 282 | goto out_unlock; |
283 | |||
284 | truncate_setsize(inode, attr->ia_size); | ||
285 | hpfs_truncate(inode); | ||
283 | } | 286 | } |
284 | 287 | ||
285 | setattr_copy(inode, attr); | 288 | setattr_copy(inode, attr); |