Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163671
b: refs/heads/master
c: a827eaf
h: refs/heads/master
i:
  163669: f8d02bb
  163667: c9a361a
  163663: 23b5ef9
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed Sep 10, 2009
1 parent b95b117 commit f019b03
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 44fc48f7048ab9657b524938a832fec4e0acea98
refs/heads/master: a827eaffff07c7d58a4cb32158cbeb4849f4e33a
13 changes: 11 additions & 2 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5286,12 +5286,21 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
else
len = PAGE_CACHE_SIZE;

lock_page(page);
/*
* return if we have all the buffers mapped. This avoid
* the need to call write_begin/write_end which does a
* journal_start/journal_stop which can block and take
* long time
*/
if (page_has_buffers(page)) {
/* return if we have all the buffers mapped */
if (!walk_page_buffers(NULL, page_buffers(page), 0, len, NULL,
ext4_bh_unmapped))
ext4_bh_unmapped)) {
unlock_page(page);
goto out_unlock;
}
}
unlock_page(page);
/*
* OK, we need to fill the hole... Do write_begin write_end
* to do block allocation/reservation.We are not holding
Expand Down

0 comments on commit f019b03

Please sign in to comment.