Skip to content

Commit 99fb19d

Browse files
error27teigland
authored andcommitted
dlm: cleanup remove unused code
Smatch complains because "lkb" is never NULL. Looking at it, the original code actually adds the new element to the end of the list fine, so we can just get rid of the if condition. This code is four years old and no one has complained so it must work. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent be1066b commit 99fb19d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/dlm/lock.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,7 @@ static void lkb_add_ordered(struct list_head *new, struct list_head *head,
733733
if (lkb->lkb_rqmode < mode)
734734
break;
735735

736-
if (!lkb)
737-
list_add_tail(new, head);
738-
else
739-
__list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
736+
__list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
740737
}
741738

742739
/* add/remove lkb to rsb's grant/convert/wait queue */

0 commit comments

Comments
 (0)