projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6161aa
)
hostfs: fix a not needed double check
author
Marco Stornelli
<
[email protected]
>
Sat, 20 Oct 2012 10:02:59 +0000
(12:02 +0200)
committer
Richard Weinberger
<
[email protected]
>
Mon, 11 Mar 2013 09:08:02 +0000
(10:08 +0100)
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 <
[email protected]
>
Signed-off-by: Richard Weinberger <
[email protected]
>
fs/hostfs/hostfs_kern.c
patch
|
blob
|
history
diff --git
a/fs/hostfs/hostfs_kern.c
b/fs/hostfs/hostfs_kern.c
index fbabb906066fa4756c846e6c6e6e577f00f1b6ed..178b90c229b52f5b42b7cacc30f6a1f7ebea89b2 100644
(file)
--- 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);