Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128577
b: refs/heads/master
c: 190662b
h: refs/heads/master
i:
  128575: cd0dc58
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 8c37e45 commit 158298d
Show file tree
Hide file tree
Showing 3 changed files with 9 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: 4aec2b52327b3a3a20faa3f1af3102c0d97c7c92
refs/heads/master: 190662b2128dd648749e197f5563e9f6bbb5e05c
9 changes: 7 additions & 2 deletions trunk/fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@ u64 find_lock_delalloc_range(struct extent_map_tree *tree,
search_again:
node = tree_search(&tree->state, cur_start);
if (!node || IS_ERR(node)) {
*end = (u64)-1;
goto out;
}

Expand All @@ -1079,6 +1080,8 @@ u64 find_lock_delalloc_range(struct extent_map_tree *tree,
goto out;
}
if (!(state->state & EXTENT_DELALLOC)) {
if (!found)
*end = state->end;
goto out;
}
if (!found) {
Expand Down Expand Up @@ -1841,8 +1844,10 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
nr_delalloc = find_lock_delalloc_range(tree, &delalloc_start,
&delalloc_end,
128 * 1024 * 1024);
if (nr_delalloc <= 0)
break;
if (nr_delalloc == 0) {
delalloc_start = delalloc_end + 1;
continue;
}
tree->ops->fill_delalloc(inode, delalloc_start,
delalloc_end);
clear_extent_bit(tree, delalloc_start,
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ static int btrfs_cow_one_page(struct inode *inode, struct page *page,
u64 page_start = (u64)page->index << PAGE_CACHE_SHIFT;
u64 page_end = page_start + PAGE_CACHE_SIZE - 1;

WARN_ON(!PageLocked(page));
set_page_extent_mapped(page);

lock_extent(em_tree, page_start, page_end, GFP_NOFS);
Expand Down

0 comments on commit 158298d

Please sign in to comment.