From b19055bd7870d063b30868438f3cf8cfd90003a3 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 31 Mar 2006 02:30:29 -0800 Subject: [PATCH] --- yaml --- r: 24876 b: refs/heads/master c: 5ce29646ebe352587e3b3160d599010c5da1b9dd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/locks.c | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index e2242927efad..a25b58ae16dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: da2e9e1ff40c863a12803c32209baaded3512433 +refs/heads/master: 5ce29646ebe352587e3b3160d599010c5da1b9dd diff --git a/trunk/fs/locks.c b/trunk/fs/locks.c index 4d9e71d43e7e..8fcfeb177a2a 100644 --- a/trunk/fs/locks.c +++ b/trunk/fs/locks.c @@ -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);