summaryrefslogtreecommitdiffstats
path: root/fs/dlm/plock.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-06-22 20:45:04 +0200
committerDavid Teigland <teigland@redhat.com>2022-06-23 21:22:10 +0200
commit976a062434739dffa1f5eec77f254109247a5a00 (patch)
treef3b9ff5b22b86c28a442d6716222bb1148aa0e85 /fs/dlm/plock.c
parentLinux 5.19-rc3 (diff)
downloadlinux-976a062434739dffa1f5eec77f254109247a5a00.tar.xz
linux-976a062434739dffa1f5eec77f254109247a5a00.zip
fs: dlm: plock use list_first_entry
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> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/plock.c')
-rw-r--r--fs/dlm/plock.c2
1 files changed, 1 insertions, 1 deletions
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