Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92997
b: refs/heads/master
c: b28ba9f
h: refs/heads/master
i:
  92995: d22492c
v: v3
  • Loading branch information
David Woodhouse committed Feb 25, 2008
1 parent 334a34a commit f3c2904
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66a10506d632051e1153e2555f4b2c820d427f64
refs/heads/master: b28ba9fa0154f78f3d36f5ae9a42f7bb01663cca
7 changes: 5 additions & 2 deletions trunk/fs/jffs2/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
if (ivalid & ATTR_SIZE && inode->i_size < iattr->ia_size) {
jffs2_add_full_dnode_to_inode(c, f, new_metadata);
inode->i_size = iattr->ia_size;
inode->i_blocks = (inode->i_size + 511) >> 9;
f->metadata = NULL;
} else {
f->metadata = new_metadata;
Expand All @@ -167,8 +168,10 @@ int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
We are protected from a simultaneous write() extending i_size
back past iattr->ia_size, because do_truncate() holds the
generic inode semaphore. */
if (ivalid & ATTR_SIZE && inode->i_size > iattr->ia_size)
vmtruncate(inode, iattr->ia_size);
if (ivalid & ATTR_SIZE && inode->i_size > iattr->ia_size) {
vmtruncate(inode, iattr->ia_size);
inode->i_blocks = (inode->i_size + 511) >> 9;
}

return 0;
}
Expand Down

0 comments on commit f3c2904

Please sign in to comment.