summaryrefslogtreecommitdiffstats
path: root/fs/hostfs/hostfs_kern.c
diff options
context:
space:
mode:
authorMarco Stornelli <marco.stornelli@gmail.com>2012-10-20 12:02:59 +0200
committerRichard Weinberger <richard@nod.at>2013-03-11 10:08:02 +0100
commitbc077320f8f6449197f4010d6774afab7bb998b2 (patch)
treedefc2beee29ff4320d5af6000b29b6056b3dd741 /fs/hostfs/hostfs_kern.c
parentLinux 3.9-rc2 (diff)
downloadlinux-bc077320f8f6449197f4010d6774afab7bb998b2.tar.xz
linux-bc077320f8f6449197f4010d6774afab7bb998b2.zip
hostfs: fix a not needed double check
With the commit 3be2be0a32c18b0fd6d623cda63174a332ca0de1 we removed vmtruncate, but actaully there is no need to call inode_newsize_ok() because the checks are already done in inode_change_ok() at the begin of the function. Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to '')
-rw-r--r--fs/hostfs/hostfs_kern.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index fbabb906066f..178b90c229b5 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -845,15 +845,8 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
return err;
if ((attr->ia_valid & ATTR_SIZE) &&
- attr->ia_size != i_size_read(inode)) {
- int error;
-
- error = inode_newsize_ok(inode, attr->ia_size);
- if (error)
- return error;
-
+ attr->ia_size != i_size_read(inode))
truncate_setsize(inode, attr->ia_size);
- }
setattr_copy(inode, attr);
mark_inode_dirty(inode);