Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231763
b: refs/heads/master
c: 91ca338
h: refs/heads/master
i:
  231761: 7cfa254
  231759: b3dcd13
v: v3
  • Loading branch information
Tsutomu Itoh authored and Chris Mason committed Jan 16, 2011
1 parent 46a20a2 commit f53e839
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff175d57f057f77d2d3031d674c2af9167a4af02
refs/heads/master: 91ca338d776e0cefb255bf2979b6448febd880f5
6 changes: 6 additions & 0 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2516,6 +2516,9 @@ static int push_leaf_right(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_assert_tree_locked(path->nodes[1]);

right = read_node_slot(root, upper, slot + 1);
if (right == NULL)
return 1;

btrfs_tree_lock(right);
btrfs_set_lock_blocking(right);

Expand Down Expand Up @@ -2766,6 +2769,9 @@ static int push_leaf_left(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_assert_tree_locked(path->nodes[1]);

left = read_node_slot(root, path->nodes[1], slot - 1);
if (left == NULL)
return 1;

btrfs_tree_lock(left);
btrfs_set_lock_blocking(left);

Expand Down
8 changes: 8 additions & 0 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
WARN_ON(len == 0);

eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS);
if (eb == NULL) {
WARN_ON(1);
goto out;
}
ret = btree_read_extent_buffer_pages(root, eb, start + PAGE_CACHE_SIZE,
btrfs_header_generation(eb));
BUG_ON(ret);
Expand Down Expand Up @@ -427,6 +431,10 @@ static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end,
WARN_ON(len == 0);

eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS);
if (eb == NULL) {
ret = -EIO;
goto out;
}

found_start = btrfs_header_bytenr(eb);
if (found_start != start) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3075,6 +3075,8 @@ static struct extent_buffer *__alloc_extent_buffer(struct extent_io_tree *tree,
#endif

eb = kmem_cache_zalloc(extent_buffer_cache, mask);
if (eb == NULL)
return NULL;
eb->start = start;
eb->len = len;
spin_lock_init(&eb->lock);
Expand Down

0 comments on commit f53e839

Please sign in to comment.