Skip to contentSkip to conversation

VFS,fs/locks.c: cleanup locks_insert_block

PATCH Trond Myklebust 1 participant 1 message Mar 21, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: J. Bruce Fields <[email protected]>

BUG instead of handling a case that should never happen.

---

 fs/locks.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
fs/locks.c +1 -6
index 1b4b899..a2278bc 100644
@@ -533,12 +533,7 @@ static void locks_delete_block(struct fi
 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))