FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 03-22-2010, 12:50 PM
David Teigland
 
Default dlm: cleanup remove unused code

On Mon, Mar 22, 2010 at 03:03:54PM +0300, Dan Carpenter wrote:
> 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.

Thanks, queued for the next pull.
Dave
 
Old 05-19-2010, 02:54 PM
David Teigland
 
Default dlm: cleanup remove unused code

From: Dan Carpenter <error27@gmail.com>

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 | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)

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 */
--
1.6.6
 

Thread Tools




All times are GMT. The time now is 11:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org