X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fntfs%2Finode.c;h=d3e118cc6ffa8f0016c5eb93e246aded38a1cc14;hb=769cb858c23ba7379ea27208624b444cd7b61af2;hp=1d27331e6fc945ee1ddba591d47ddf1ef1bafbd1;hpb=42859eea96ba6beabfb0369a1eeffa3c7d2bd9cb;p=karo-tx-linux.git diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index 1d27331e6fc9..d3e118cc6ffa 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c @@ -2866,9 +2866,11 @@ conv_err_out: * * See ntfs_truncate() description above for details. */ +#ifdef NTFS_RW void ntfs_truncate_vfs(struct inode *vi) { ntfs_truncate(vi); } +#endif /** * ntfs_setattr - called from notify_change() when an attribute is being changed @@ -2914,8 +2916,10 @@ int ntfs_setattr(struct dentry *dentry, struct iattr *attr) NInoCompressed(ni) ? "compressed" : "encrypted"); err = -EOPNOTSUPP; - } else - err = vmtruncate(vi, attr->ia_size); + } else { + truncate_setsize(vi, attr->ia_size); + ntfs_truncate_vfs(vi); + } if (err || ia_valid == ATTR_SIZE) goto out; } else {