diff options
author | Marco Stornelli <marco.stornelli@gmail.com> | 2012-10-20 06:02:59 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2013-03-11 05:08:02 -0400 |
commit | bc077320f8f6449197f4010d6774afab7bb998b2 (patch) | |
tree | defc2beee29ff4320d5af6000b29b6056b3dd741 /fs/hostfs | |
parent | f6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff) |
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 'fs/hostfs')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 9 |
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) | |||
845 | return err; | 845 | return err; |
846 | 846 | ||
847 | if ((attr->ia_valid & ATTR_SIZE) && | 847 | if ((attr->ia_valid & ATTR_SIZE) && |
848 | attr->ia_size != i_size_read(inode)) { | 848 | attr->ia_size != i_size_read(inode)) |
849 | int error; | ||
850 | |||
851 | error = inode_newsize_ok(inode, attr->ia_size); | ||
852 | if (error) | ||
853 | return error; | ||
854 | |||
855 | truncate_setsize(inode, attr->ia_size); | 849 | truncate_setsize(inode, attr->ia_size); |
856 | } | ||
857 | 850 | ||
858 | setattr_copy(inode, attr); | 851 | setattr_copy(inode, attr); |
859 | mark_inode_dirty(inode); | 852 | mark_inode_dirty(inode); |