Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262250
b: refs/heads/master
c: 3150b69
h: refs/heads/master
v: v3
  • Loading branch information
Xiao Guangrong authored and Chris Mason committed Aug 1, 2011
1 parent 714f0cc commit 5543a61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 3a6d457ec79d4cdf2313189b4e852e53f2b8d2b2
refs/heads/master: 3150b6996934455d7f2da243939d80a9b839085a
10 changes: 5 additions & 5 deletions trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ static void clear_state_cb(struct extent_io_tree *tree,
tree->ops->clear_bit_hook(tree->mapping->host, state, bits);
}

static void set_state_bits(struct extent_io_tree *tree,
struct extent_state *state, int *bits);

/*
* insert an extent_state struct into the tree. 'bits' are set on the
* struct before it is inserted.
Expand All @@ -318,7 +321,6 @@ static int insert_state(struct extent_io_tree *tree,
int *bits)
{
struct rb_node *node;
int bits_to_set = *bits & ~EXTENT_CTLBITS;

if (end < start) {
printk(KERN_ERR "btrfs end < start %llu %llu\n",
Expand All @@ -328,11 +330,9 @@ static int insert_state(struct extent_io_tree *tree,
}
state->start = start;
state->end = end;
set_state_cb(tree, state, bits);

if (bits_to_set & EXTENT_DIRTY)
tree->dirty_bytes += end - start + 1;
state->state |= bits_to_set;
set_state_bits(tree, state, bits);

node = tree_insert(&tree->state, end, &state->rb_node);
if (node) {
struct extent_state *found;
Expand Down

0 comments on commit 5543a61

Please sign in to comment.