From: Dan Carpenter Date: Mon, 22 Mar 2010 12:03:54 +0000 (+0300) Subject: dlm: cleanup remove unused code X-Git-Tag: v2.6.35-rc1~464^2~1 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=99fb19d49ecbeb390e023f58867c227a15f422f7;p=safe%2Fjmp%2Flinux-2.6 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 Signed-off-by: David Teigland --- diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 17903b4..031dbe3 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -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 */