Don't panic!  Just BUG_ON().

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Miklos Szeredi 2006-03-31 02:30:29 -08:00 коммит произвёл Linus Torvalds
Родитель da2e9e1ff4
Коммит 5ce29646eb
1 изменённых файлов: 3 добавлений и 12 удалений

Просмотреть файл

@ -168,18 +168,9 @@ static void locks_release_private(struct file_lock *fl)
/* Free a lock which is not in use. */ /* Free a lock which is not in use. */
static void locks_free_lock(struct file_lock *fl) static void locks_free_lock(struct file_lock *fl)
{ {
if (fl == NULL) { BUG_ON(waitqueue_active(&fl->fl_wait));
BUG(); BUG_ON(!list_empty(&fl->fl_block));
return; BUG_ON(!list_empty(&fl->fl_link));
}
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");
locks_release_private(fl); locks_release_private(fl);
kmem_cache_free(filelock_cache, fl); kmem_cache_free(filelock_cache, fl);