Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297876
b: refs/heads/master
c: be1a556
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh authored and David Sterba committed Mar 22, 2012
1 parent 2b52378 commit ce549d8
Show file tree
Hide file tree
Showing 2 changed files with 8 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: ce598979be6f83549c90f42ba522a19a33727611
refs/heads/master: be1a5564fd39fa2ca6adbb41c75fb08f96a1ffcb
11 changes: 7 additions & 4 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
if (btrfs_block_can_be_shared(root, buf)) {
ret = btrfs_lookup_extent_info(trans, root, buf->start,
buf->len, &refs, &flags);
BUG_ON(ret);
if (ret)
return ret;
BUG_ON(refs == 0);
} else {
refs = 1;
Expand Down Expand Up @@ -375,7 +376,8 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
buf->start,
buf->len,
new_flags, 0);
BUG_ON(ret);
if (ret)
return ret;
}
} else {
if (flags & BTRFS_BLOCK_FLAG_FULL_BACKREF) {
Expand Down Expand Up @@ -415,7 +417,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
{
struct btrfs_disk_key disk_key;
struct extent_buffer *cow;
int level;
int level, ret;
int last_ref = 0;
int unlock_orig = 0;
u64 parent_start;
Expand Down Expand Up @@ -467,7 +469,8 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
(unsigned long)btrfs_header_fsid(cow),
BTRFS_FSID_SIZE);

update_ref_for_cow(trans, root, buf, cow, &last_ref);
ret = update_ref_for_cow(trans, root, buf, cow, &last_ref);
BUG_ON(ret);

if (root->ref_cows)
btrfs_reloc_cow_block(trans, root, buf, cow);
Expand Down

0 comments on commit ce549d8

Please sign in to comment.