]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
dlm: cleanup remove unused code
authorDan Carpenter <error27@gmail.com>
Mon, 22 Mar 2010 12:03:54 +0000 (15:03 +0300)
committerDavid Teigland <teigland@redhat.com>
Fri, 30 Apr 2010 19:52:28 +0000 (14:52 -0500)
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>
fs/dlm/lock.c

index 17903b491298521839ebfe9c3d6100d225fd6e64..031dbe3a15ca302a38b5ddcb16d32fbeca9d6d00 100644 (file)
@@ -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 */