cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH dlm/next 1/6] fs: dlm: plock use list_first_entry
@ 2022-05-26 20:15 Alexander Aring
  2022-05-26 20:15 ` [Cluster-devel] [PATCH dlm/next 2/6] fs: dlm: remove may interrupted message Alexander Aring
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Alexander Aring @ 2022-05-26 20:15 UTC (permalink / raw)
  To: cluster-devel.redhat.com

This patch will use the list helper list_first_entry() instead of using
list_entry() to get the first element of a list.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
 fs/dlm/plock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index 0993eebf2060..7cab5d27132b 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -378,7 +378,7 @@ static ssize_t dev_read(struct file *file, char __user *u, size_t count,
 
 	spin_lock(&ops_lock);
 	if (!list_empty(&send_list)) {
-		op = list_entry(send_list.next, struct plock_op, list);
+		op = list_first_entry(&send_list, struct plock_op, list);
 		if (op->info.flags & DLM_PLOCK_FL_CLOSE)
 			list_del(&op->list);
 		else
-- 
2.31.1


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

end of thread, other threads:[~2022-05-26 20:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26 20:15 [Cluster-devel] [PATCH dlm/next 1/6] fs: dlm: plock use list_first_entry Alexander Aring
2022-05-26 20:15 ` [Cluster-devel] [PATCH dlm/next 2/6] fs: dlm: remove may interrupted message Alexander Aring
2022-05-26 20:15 ` [Cluster-devel] [PATCH dlm/next 3/6] fs: dlm: add pid to debug log Alexander Aring
2022-05-26 20:15 ` [Cluster-devel] [PATCH dlm/next 4/6] fs: dlm: change log output to debug again Alexander Aring
2022-05-26 20:15 ` [Cluster-devel] [PATCH dlm/next 5/6] fs: dlm: use dlm_plock_info for do_unlock_close Alexander Aring
2022-05-26 20:15 ` [Cluster-devel] [PATCH dlm/next 6/6] fs: dlm: change posix lock sigint handling Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).