summaryrefslogtreecommitdiff
path: root/fs/dlm
diff options
context:
space:
mode:
authorShaurya Rane <ssrane_b23@ee.vjti.ac.in>2026-01-20 10:35:07 -0500
committerDavid Teigland <teigland@redhat.com>2026-01-20 12:07:31 -0600
commit6155b409761f50c7f3353739610bb37e02422116 (patch)
treec358bfbb4180a01b3d856cb8bca4c3cc6ed5d5fd /fs/dlm
parent080e5563f878c64e697b89e7439d730d0daad882 (diff)
downloadlinux-next-6155b409761f50c7f3353739610bb37e02422116.tar.gz
linux-next-6155b409761f50c7f3353739610bb37e02422116.zip
fs/dlm: use list_add_tail() instead of open-coding list insertion
Replace the manual list pointer manipulation in add_ordered_member() with the standard list_add_tail() helper. The original code explicitly updated ->prev and ->next pointers to insert @newlist before @tmp, which is exactly what list_add_tail(newlist, tmp) provides. Using the list macro improves readability, removes a source of potential pointer bugs, and satisfies the existing FIXME requesting conversion to the list helpers. No functional change in the ordering logic for DLM members. Signed-off-by: Shaurya Rane <ssrane_b23@ee.vjti.ac.in> Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/member.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index c0f557a80a75..c1b5598997b7 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -299,11 +299,7 @@ static void add_ordered_member(struct dlm_ls *ls, struct dlm_member *new)
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;
+ list_add_tail(newlist, tmp);
}
}