Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131056
b: refs/heads/master
c: 3935127
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Feb 4, 2009
1 parent 5c79f1f commit f9bb0c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: b7a9f29fcf4e53e9ca7982331649fa2013e69c99
refs/heads/master: 3935127c50c84106d654ef14962cff28c660bc62
16 changes: 8 additions & 8 deletions trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static LIST_HEAD(buffers);
static LIST_HEAD(states);

#define LEAK_DEBUG 0
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
static DEFINE_SPINLOCK(leak_lock);
#endif

Expand Down Expand Up @@ -119,7 +119,7 @@ void extent_io_tree_init(struct extent_io_tree *tree,
static struct extent_state *alloc_extent_state(gfp_t mask)
{
struct extent_state *state;
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
unsigned long flags;
#endif

Expand All @@ -129,7 +129,7 @@ static struct extent_state *alloc_extent_state(gfp_t mask)
state->state = 0;
state->private = 0;
state->tree = NULL;
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
spin_lock_irqsave(&leak_lock, flags);
list_add(&state->leak_list, &states);
spin_unlock_irqrestore(&leak_lock, flags);
Expand All @@ -144,11 +144,11 @@ static void free_extent_state(struct extent_state *state)
if (!state)
return;
if (atomic_dec_and_test(&state->refs)) {
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
unsigned long flags;
#endif
WARN_ON(state->tree);
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
spin_lock_irqsave(&leak_lock, flags);
list_del(&state->leak_list);
spin_unlock_irqrestore(&leak_lock, flags);
Expand Down Expand Up @@ -2983,15 +2983,15 @@ static struct extent_buffer *__alloc_extent_buffer(struct extent_io_tree *tree,
gfp_t mask)
{
struct extent_buffer *eb = NULL;
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
unsigned long flags;
#endif

eb = kmem_cache_zalloc(extent_buffer_cache, mask);
eb->start = start;
eb->len = len;
mutex_init(&eb->mutex);
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
spin_lock_irqsave(&leak_lock, flags);
list_add(&eb->leak_list, &buffers);
spin_unlock_irqrestore(&leak_lock, flags);
Expand All @@ -3003,7 +3003,7 @@ static struct extent_buffer *__alloc_extent_buffer(struct extent_io_tree *tree,

static void __free_extent_buffer(struct extent_buffer *eb)
{
#ifdef LEAK_DEBUG
#if LEAK_DEBUG
unsigned long flags;
spin_lock_irqsave(&leak_lock, flags);
list_del(&eb->leak_list);
Expand Down

0 comments on commit f9bb0c1

Please sign in to comment.