提交 5ce29646 编写于 作者: M Miklos Szeredi 提交者: Linus Torvalds

[PATCH] locks: don't panic

Don't panic!  Just BUG_ON().
Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 da2e9e1f
......@@ -168,18 +168,9 @@ static void locks_release_private(struct file_lock *fl)
/* Free a lock which is not in use. */
static void locks_free_lock(struct file_lock *fl)
{
if (fl == NULL) {
BUG();
return;
}
if (waitqueue_active(&fl->fl_wait))
panic("Attempting to free lock with active wait queue");
if (!list_empty(&fl->fl_block))
panic("Attempting to free lock with active block list");
if (!list_empty(&fl->fl_link))
panic("Attempting to free lock on active lock list");
BUG_ON(waitqueue_active(&fl->fl_wait));
BUG_ON(!list_empty(&fl->fl_block));
BUG_ON(!list_empty(&fl->fl_link));
locks_release_private(fl);
kmem_cache_free(filelock_cache, fl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册