Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72217
b: refs/heads/master
c: 2a754b5
h: refs/heads/master
i:
  72215: cf2e0b0
v: v3
  • Loading branch information
Nick Piggin authored and David Woodhouse committed Oct 22, 2007
1 parent 6c8e963 commit ec3631e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: c21f900cb8817009930e672d22a5b91e5b706351
refs/heads/master: 2a754b51aacb122cec25c849e3cf7f5503cc3ec6
11 changes: 4 additions & 7 deletions trunk/fs/jffs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping,
_whole_ page. This helps to reduce the number of
nodes in files which have many short writes, like
syslog files. */
start = aligned_start = 0;
aligned_start = 0;
}

ri = jffs2_alloc_raw_inode();
Expand Down Expand Up @@ -291,14 +291,11 @@ static int jffs2_write_end(struct file *filp, struct address_space *mapping,
}

/* Adjust writtenlen for the padding we did, so we don't confuse our caller */
if (writtenlen < (start&3))
writtenlen = 0;
else
writtenlen -= (start&3);
writtenlen -= min(writtenlen, (start - aligned_start));

if (writtenlen) {
if (inode->i_size < (pg->index << PAGE_CACHE_SHIFT) + start + writtenlen) {
inode->i_size = (pg->index << PAGE_CACHE_SHIFT) + start + writtenlen;
if (inode->i_size < pos + writtenlen) {
inode->i_size = pos + writtenlen;
inode->i_blocks = (inode->i_size + 511) >> 9;

inode->i_ctime = inode->i_mtime = ITIME(je32_to_cpu(ri->ctime));
Expand Down

0 comments on commit ec3631e

Please sign in to comment.