aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/plock.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-06-22 14:45:04 -0400
committerDavid Teigland <teigland@redhat.com>2022-06-23 14:22:10 -0500
commit976a062434739dffa1f5eec77f254109247a5a00 (patch)
treef3b9ff5b22b86c28a442d6716222bb1148aa0e85 /fs/dlm/plock.c
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e (diff)
downloadlinux-976a062434739dffa1f5eec77f254109247a5a00.tar.gz
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 0993eebf20605..7cab5d27132b8 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