summaryrefslogtreecommitdiffstats
path: root/fs/sysv/file.c
diff options
context:
space:
mode:
authorMarco Stornelli <marco.stornelli@gmail.com>2012-12-15 11:45:58 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-20 14:00:01 -0500
commitfa4d62ae17c7415f1ea824076870b7ad9b51fd06 (patch)
treecbb66b2be8f1c1a8cf8f1f89c9580af9f6056767 /fs/sysv/file.c
parent83f6e3710a932d400100767ad445a4bd9476e083 (diff)
sysv: 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/sysv/file.c')
-rw-r--r--fs/sysv/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sysv/file.c b/fs/sysv/file.c
index 0a65939508e..9d4dc683179 100644
--- a/fs/sysv/file.c
+++ b/fs/sysv/file.c
@@ -41,9 +41,11 @@ static int sysv_setattr(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);
+ sysv_truncate(inode);
}
setattr_copy(inode, attr);
@@ -52,7 +54,6 @@ static int sysv_setattr(struct dentry *dentry, struct iattr *attr)
}
const struct inode_operations sysv_file_inode_operations = {
- .truncate = sysv_truncate,
.setattr = sysv_setattr,
.getattr = sysv_getattr,
};