The bio completion handlers can be run in any context, e.g. when using
the old ide driver they run in hardirq context with irqs disabled so
lockdep rightfully warns about using write_lock_irq useage in these
handlers.
This patch switches clear_extent_bit and set_extent_bit to
write_lock_irqsave to fix this problem.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
struct extent_state *state;
struct extent_state *prealloc = NULL;
struct rb_node *node;
struct extent_state *state;
struct extent_state *prealloc = NULL;
struct rb_node *node;
- write_lock_irq(&tree->lock);
+ write_lock_irqsave(&tree->lock, flags);
/*
* this search will find the extents that end after
* our range starts
/*
* this search will find the extents that end after
* our range starts
- write_unlock_irq(&tree->lock);
+ write_unlock_irqrestore(&tree->lock, flags);
if (prealloc)
free_extent_state(prealloc);
if (prealloc)
free_extent_state(prealloc);
search_again:
if (start >= end)
goto out;
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;
if (mask & __GFP_WAIT)
cond_resched();
goto again;
struct extent_state *state;
struct extent_state *prealloc = NULL;
struct rb_node *node;
struct extent_state *state;
struct extent_state *prealloc = NULL;
struct rb_node *node;
int err = 0;
int set;
u64 last_start;
int err = 0;
int set;
u64 last_start;
- write_lock_irq(&tree->lock);
+ write_lock_irqsave(&tree->lock, flags);
/*
* this search will find all the extents that end after
* our range starts.
/*
* this search will find all the extents that end after
* our range starts.
- write_unlock_irq(&tree->lock);
+ write_unlock_irqrestore(&tree->lock, flags);
if (prealloc)
free_extent_state(prealloc);
if (prealloc)
free_extent_state(prealloc);
search_again:
if (start > end)
goto out;
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;
if (mask & __GFP_WAIT)
cond_resched();
goto again;