public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs: dlm: Remove impossible to hit if statement
@ 2023-11-05 22:21 Joey Pabalinas
  2023-11-05 23:11 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Joey Pabalinas @ 2023-11-05 22:21 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
---
 fs/dlm/member.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index be7909ead71b427aa5..bf7085f21a708ab860 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -294,19 +294,14 @@ static void add_ordered_member(struct dlm_ls
*ls, struct dlm_member *new)
  memb = list_entry(tmp, struct dlm_member, list);
  if (new->nodeid < memb->nodeid)
  break;
  }

- if (!memb)
- list_add_tail(newlist, head);
- else {
- /* FIXME: can use list macro here */
- newlist->prev = tmp->prev;
- newlist->next = tmp;
- tmp->prev->next = newlist;
- tmp->prev = newlist;
- }
+ newlist->prev = tmp->prev;
+ newlist->next = tmp;
+ tmp->prev->next = newlist;
+ tmp->prev = newlist;
 }

 static int add_remote_member(int nodeid)
 {
  int error;

base-commit: 1c41041124bd14dd6610da256a3da4e5b74ce6b1
-- 
Cheers,
Joey Pabalinas

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-05 23:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-05 22:21 [PATCH] fs: dlm: Remove impossible to hit if statement Joey Pabalinas
2023-11-05 23:11 ` Al Viro
2023-11-05 23:57   ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox