Skip to content

Commit

Permalink
dlm: cleanup remove unused code
Browse files Browse the repository at this point in the history
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 <error27@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
Dan Carpenter authored and David Teigland committed Apr 30, 2010
1 parent be1066b commit 99fb19d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,7 @@ static void lkb_add_ordered(struct list_head *new, struct list_head *head,
if (lkb->lkb_rqmode < mode)
break;

if (!lkb)
list_add_tail(new, head);
else
__list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
__list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
}

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

0 comments on commit 99fb19d

Please sign in to comment.