From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Wed, 22 Jun 2022 14:45:04 -0400 Subject: [Cluster-devel] [PATCH RESEND v5.19-rc3 01/20] fs: dlm: plock use list_first_entry In-Reply-To: <20220622184523.1886869-1-aahringo@redhat.com> References: <20220622184523.1886869-1-aahringo@redhat.com> Message-ID: <20220622184523.1886869-2-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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