提交 6bf05d03 编写于 作者: J Jens Axboe

writeback: fix bad _bh spinlock nesting

Fix a bug where a lock is _bh nested within another _bh lock,
but forgets to use the _bh variant for unlock.

Further more, it's not necessary to test _bh locks, the inner lock
can just use spin_lock(). So fix up the bug by making that change.
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 e7f52dfb
...@@ -415,7 +415,8 @@ static int bdi_forker_thread(void *ptr) ...@@ -415,7 +415,8 @@ static int bdi_forker_thread(void *ptr)
break; break;
} }
spin_lock_bh(&bdi->wb_lock); spin_lock(&bdi->wb_lock);
/* /*
* If there is no work to do and the bdi thread was * If there is no work to do and the bdi thread was
* inactive long enough - kill it. The wb_lock is taken * inactive long enough - kill it. The wb_lock is taken
...@@ -432,7 +433,7 @@ static int bdi_forker_thread(void *ptr) ...@@ -432,7 +433,7 @@ static int bdi_forker_thread(void *ptr)
action = KILL_THREAD; action = KILL_THREAD;
break; break;
} }
spin_unlock_bh(&bdi->wb_lock); spin_unlock(&bdi->wb_lock);
} }
spin_unlock_bh(&bdi_lock); spin_unlock_bh(&bdi_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册