aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-22 08:03:54 -0400
committerDavid Teigland <teigland@redhat.com>2010-04-30 15:52:28 -0400
commit99fb19d49ecbeb390e023f58867c227a15f422f7 (patch)
tree80560a57aa2b588ceaff2f65073c250c3bb317a1 /fs/dlm
parentbe1066bbcd443a65df312fdecea7e4959adedb45 (diff)
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 <error27@gmail.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 17903b49129..031dbe3a15c 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,
733 if (lkb->lkb_rqmode < mode) 733 if (lkb->lkb_rqmode < mode)
734 break; 734 break;
735 735
736 if (!lkb) 736 __list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
737 list_add_tail(new, head);
738 else
739 __list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
740} 737}
741 738
742/* add/remove lkb to rsb's grant/convert/wait queue */ 739/* add/remove lkb to rsb's grant/convert/wait queue */