Messages in this thread Patch in this message | | | Subject | [PATCH] locks: don't panic | From | Miklos Szeredi <> | Date | Thu, 23 Mar 2006 18:54:30 +0100 |
| |
Don't panic! Just BUG_ON().
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Index: linux/fs/locks.c =================================================================== --- linux.orig/fs/locks.c 2006-03-22 16:09:10.000000000 +0100 +++ linux/fs/locks.c 2006-03-22 16:10:23.000000000 +0100 @@ -156,18 +156,9 @@ static struct file_lock *locks_alloc_loc /* 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)); if (fl->fl_ops) { if (fl->fl_ops->fl_release_private) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |