From: J. Bruce Fields Date: Sun, 26 Mar 2006 09:37:24 +0000 (-0800) Subject: [PATCH] VFS,fs/locks.c: cleanup locks_insert_block X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6dc0fe8f8b40854982929e4f24d8c65115769b60;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] VFS,fs/locks.c: cleanup locks_insert_block BUG instead of handling a case that should never happen. Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/locks.c b/fs/locks.c index 709450a7b89d..4badf6a0e7b6 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -533,12 +533,7 @@ static void locks_delete_block(struct file_lock *waiter) static void locks_insert_block(struct file_lock *blocker, struct file_lock *waiter) { - if (!list_empty(&waiter->fl_block)) { - printk(KERN_ERR "locks_insert_block: removing duplicated lock " - "(pid=%d %Ld-%Ld type=%d)\n", waiter->fl_pid, - waiter->fl_start, waiter->fl_end, waiter->fl_type); - __locks_delete_block(waiter); - } + BUG_ON(!list_empty(&waiter->fl_block)); list_add_tail(&waiter->fl_block, &blocker->fl_block); waiter->fl_next = blocker; if (IS_POSIX(blocker))