提交 bc077320 编写于 作者: M Marco Stornelli 提交者: Richard Weinberger

hostfs: fix a not needed double check

With the commit 3be2be0a 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: NMarco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 f6161aa1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册