From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Thu, 27 Oct 2022 16:45:17 -0400 Subject: [Cluster-devel] [PATCH v6.1-rc1 07/18] fs: dlm: use list_first_entry marco In-Reply-To: <20221027204528.1119036-1-aahringo@redhat.com> References: <20221027204528.1119036-1-aahringo@redhat.com> Message-ID: <20221027204528.1119036-7-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 Instead of using list_entry() this patch moves to using the list_first_entry() macro. Signed-off-by: Alexander Aring --- fs/dlm/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dlm/user.c b/fs/dlm/user.c index c5d27bccc3dc..6a5de0918a96 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -857,7 +857,7 @@ static ssize_t device_read(struct file *file, char __user *buf, size_t count, without removing lkb_cb_list; so empty lkb_cb_list is always consistent with empty lkb_callbacks */ - lkb = list_entry(proc->asts.next, struct dlm_lkb, lkb_cb_list); + lkb = list_first_entry(&proc->asts, struct dlm_lkb, lkb_cb_list); /* rem_lkb_callback sets a new lkb_last_cast */ old_mode = lkb->lkb_last_cast.mode; -- 2.31.1