Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128454
b: refs/heads/master
c: 90f1c19
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and David Woodhouse committed Sep 11, 2007
1 parent f3da753 commit d835140
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 9433063bcb4b3c0c9e5ef3c24a811b63084dedb4
refs/heads/master: 90f1c19a9fd2a943adc69d2b9b8c83bcc4bba6f9
14 changes: 8 additions & 6 deletions trunk/fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ int clear_extent_bit(struct extent_map_tree *tree, u64 start, u64 end,
struct extent_state *state;
struct extent_state *prealloc = NULL;
struct rb_node *node;
unsigned long flags;
int err;
int set = 0;

Expand All @@ -466,7 +467,7 @@ int clear_extent_bit(struct extent_map_tree *tree, u64 start, u64 end,
return -ENOMEM;
}

write_lock_irq(&tree->lock);
write_lock_irqsave(&tree->lock, flags);
/*
* this search will find the extents that end after
* our range starts
Expand Down Expand Up @@ -533,7 +534,7 @@ int clear_extent_bit(struct extent_map_tree *tree, u64 start, u64 end,
goto search_again;

out:
write_unlock_irq(&tree->lock);
write_unlock_irqrestore(&tree->lock, flags);
if (prealloc)
free_extent_state(prealloc);

Expand All @@ -542,7 +543,7 @@ int clear_extent_bit(struct extent_map_tree *tree, u64 start, u64 end,
search_again:
if (start >= end)
goto out;
write_unlock_irq(&tree->lock);
write_unlock_irqrestore(&tree->lock, flags);
if (mask & __GFP_WAIT)
cond_resched();
goto again;
Expand Down Expand Up @@ -628,6 +629,7 @@ int set_extent_bit(struct extent_map_tree *tree, u64 start, u64 end, int bits,
struct extent_state *state;
struct extent_state *prealloc = NULL;
struct rb_node *node;
unsigned long flags;
int err = 0;
int set;
u64 last_start;
Expand All @@ -639,7 +641,7 @@ int set_extent_bit(struct extent_map_tree *tree, u64 start, u64 end, int bits,
return -ENOMEM;
}

write_lock_irq(&tree->lock);
write_lock_irqsave(&tree->lock, flags);
/*
* this search will find all the extents that end after
* our range starts.
Expand Down Expand Up @@ -759,7 +761,7 @@ int set_extent_bit(struct extent_map_tree *tree, u64 start, u64 end, int bits,
goto search_again;

out:
write_unlock_irq(&tree->lock);
write_unlock_irqrestore(&tree->lock, flags);
if (prealloc)
free_extent_state(prealloc);

Expand All @@ -768,7 +770,7 @@ int set_extent_bit(struct extent_map_tree *tree, u64 start, u64 end, int bits,
search_again:
if (start > end)
goto out;
write_unlock_irq(&tree->lock);
write_unlock_irqrestore(&tree->lock, flags);
if (mask & __GFP_WAIT)
cond_resched();
goto again;
Expand Down

0 comments on commit d835140

Please sign in to comment.