diff options
author | Marco Stornelli <marco.stornelli@gmail.com> | 2012-10-20 10:02:59 (GMT) |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2013-03-11 09:08:02 (GMT) |
commit | bc077320f8f6449197f4010d6774afab7bb998b2 (patch) | |
tree | defc2beee29ff4320d5af6000b29b6056b3dd741 /fs/hostfs/hostfs_kern.c | |
parent | f6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff) | |
download | linux-fsl-qoriq-bc077320f8f6449197f4010d6774afab7bb998b2.tar.xz |
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/hostfs_kern.c')
-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 fbabb90..178b90c 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); |