summaryrefslogtreecommitdiffstats
path: root/fs/affs/inode.c
diff options
context:
space:
mode:
authorMarco Stornelli <marco.stornelli@gmail.com>2012-12-15 11:51:53 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-20 20:00:01 +0100
commit1dc1834f4292624f46da7e0309bc04a3cca1b07c (patch)
tree7598e172f5ce871436d12f0b55466a6c54bae529 /fs/affs/inode.c
parentadfs: drop vmtruncate (diff)
downloadlinux-1dc1834f4292624f46da7e0309bc04a3cca1b07c.tar.xz
linux-1dc1834f4292624f46da7e0309bc04a3cca1b07c.zip
affs: drop vmtruncate
Removed vmtruncate Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs/inode.c')
-rw-r--r--fs/affs/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 15c484268229..0e092d08680e 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -237,9 +237,12 @@ affs_notify_change(struct dentry *dentry, struct iattr *attr)
if ((attr->ia_valid & ATTR_SIZE) &&
attr->ia_size != i_size_read(inode)) {
- error = vmtruncate(inode, attr->ia_size);
+ error = inode_newsize_ok(inode, attr->ia_size);
if (error)
return error;
+
+ truncate_setsize(inode, attr->ia_size);
+ affs_truncate(inode);
}
setattr_copy(inode, attr);