Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309900
b: refs/heads/master
c: 018642a
h: refs/heads/master
v: v3
  • Loading branch information
Tsutomu Itoh authored and Josef Bacik committed May 30, 2012
1 parent 07b5200 commit ca100e5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 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: 733f4fbbc1083aa343da739f46ee839705d6cfe3
refs/heads/master: 018642a1f197887058e97291460b890d296e8953
6 changes: 5 additions & 1 deletion trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,11 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
if (!cur)
return -EIO;
} else if (!uptodate) {
btrfs_read_buffer(cur, gen);
err = btrfs_read_buffer(cur, gen);
if (err) {
free_extent_buffer(cur);
return err;
}
}
}
if (search_start == 0)
Expand Down
16 changes: 13 additions & 3 deletions trunk/fs/btrfs/tree-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,9 @@ static int replay_one_buffer(struct btrfs_root *log, struct extent_buffer *eb,
int i;
int ret;

btrfs_read_buffer(eb, gen);
ret = btrfs_read_buffer(eb, gen);
if (ret)
return ret;

level = btrfs_header_level(eb);

Expand Down Expand Up @@ -1749,7 +1751,11 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,

path->slots[*level]++;
if (wc->free) {
btrfs_read_buffer(next, ptr_gen);
ret = btrfs_read_buffer(next, ptr_gen);
if (ret) {
free_extent_buffer(next);
return ret;
}

btrfs_tree_lock(next);
btrfs_set_lock_blocking(next);
Expand All @@ -1766,7 +1772,11 @@ static noinline int walk_down_log_tree(struct btrfs_trans_handle *trans,
free_extent_buffer(next);
continue;
}
btrfs_read_buffer(next, ptr_gen);
ret = btrfs_read_buffer(next, ptr_gen);
if (ret) {
free_extent_buffer(next);
return ret;
}

WARN_ON(*level <= 0);
if (path->nodes[*level-1])
Expand Down

0 comments on commit ca100e5

Please sign in to comment.