Commit e84f0355 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext3: fix scheduling-in-spinlock bug

ext3_error() sleeps, so don't call it with the lock held.
parent e4c77679
......@@ -239,9 +239,10 @@ void ext3_free_blocks (handle_t *handle, struct inode * inode,
BUFFER_TRACE(bitmap_bh, "clear bit");
if (!ext3_clear_bit_atomic(sb_bgl_lock(sbi, block_group),
bit + i, bitmap_bh->b_data)) {
ext3_error (sb, __FUNCTION__,
"bit already cleared for block %lu",
block + i);
jbd_unlock_bh_state(bitmap_bh);
ext3_error(sb, __FUNCTION__,
"bit already cleared for block %lu", block + i);
jbd_lock_bh_state(bitmap_bh);
BUFFER_TRACE(bitmap_bh, "bit already cleared");
} else {
dquot_freed_blocks++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment