diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-03-31 02:30:29 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-31 12:18:52 -0800 |
commit | 5ce29646ebe352587e3b3160d599010c5da1b9dd (patch) | |
tree | a4b080ded00de2264a4c94245da79488ea4d8a56 /fs/locks.c | |
parent | da2e9e1ff40c863a12803c32209baaded3512433 (diff) | |
download | kernel_samsung_espresso10-5ce29646ebe352587e3b3160d599010c5da1b9dd.zip kernel_samsung_espresso10-5ce29646ebe352587e3b3160d599010c5da1b9dd.tar.gz kernel_samsung_espresso10-5ce29646ebe352587e3b3160d599010c5da1b9dd.tar.bz2 |
[PATCH] locks: don't panic
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>
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -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); |