[PATCH] locks: don't panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't panic!  Just BUG_ON().

Signed-off-by: Miklos Szeredi <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux