projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b7c3fc
)
Btrfs: Make sure pages are dirty before doing delalloc for them
author
Chris Mason
<chris.mason@oracle.com>
Mon, 10 Nov 2008 12:31:30 +0000
(07:31 -0500)
committer
Chris Mason
<chris.mason@oracle.com>
Mon, 10 Nov 2008 12:31:30 +0000
(07:31 -0500)
This adds a PageDirty check to the writeback path that locks pages
for delalloc. If a page wasn't dirty at this point, it is in the
process of being truncated away.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent_io.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/extent_io.c
b/fs/btrfs/extent_io.c
index ad75a9cc3604fda59a9eacdac591e7ac962e39af..69ea09659d475f6eb84df4444b0bcffc884d7d9a 100644
(file)
--- a/
fs/btrfs/extent_io.c
+++ b/
fs/btrfs/extent_io.c
@@
-1205,7
+1205,8
@@
static noinline int lock_delalloc_pages(struct inode *inode,
*/
if (pages[i] != locked_page) {
lock_page(pages[i]);
- if (pages[i]->mapping != inode->i_mapping) {
+ if (!PageDirty(pages[i]) ||
+ pages[i]->mapping != inode->i_mapping) {
ret = -EAGAIN;
unlock_page(pages[i]);
page_cache_release(pages[i]);