Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27773
b: refs/heads/master
c: cf5eba5
h: refs/heads/master
i:
  27771: ed7ea5f
v: v3
  • Loading branch information
David Woodhouse committed May 14, 2006
1 parent 05b45b1 commit 1dbb3d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: 151e76590f66f5406eb2e1f4270c5323f385d2e8
refs/heads/master: cf5eba53346fbfdf1b80e05ca3fd7fe2ec841077
20 changes: 14 additions & 6 deletions trunk/fs/jffs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,20 @@ static int jffs2_commit_write (struct file *filp, struct page *pg,
D1(printk(KERN_DEBUG "jffs2_commit_write(): ino #%lu, page at 0x%lx, range %d-%d, flags %lx\n",
inode->i_ino, pg->index << PAGE_CACHE_SHIFT, start, end, pg->flags));

if (!start && end == PAGE_CACHE_SIZE) {
/* We need to avoid deadlock with page_cache_read() in
jffs2_garbage_collect_pass(). So we have to mark the
page up to date, to prevent page_cache_read() from
trying to re-lock it. */
SetPageUptodate(pg);
if (end == PAGE_CACHE_SIZE) {
if (!start) {
/* We need to avoid deadlock with page_cache_read() in
jffs2_garbage_collect_pass(). So we have to mark the
page up to date, to prevent page_cache_read() from
trying to re-lock it. */
SetPageUptodate(pg);
} else {
/* When writing out the end of a page, write out the
_whole_ page. This helps to reduce the number of
nodes in files which have many short writes, like
syslog files. */
start = aligned_start = 0;
}
}

ri = jffs2_alloc_raw_inode();
Expand Down

0 comments on commit 1dbb3d0

Please sign in to comment.