diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-06-22 21:45:04 +0300 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-06-23 22:22:10 +0300 |
commit | 976a062434739dffa1f5eec77f254109247a5a00 (patch) | |
tree | f3b9ff5b22b86c28a442d6716222bb1148aa0e85 /fs/dlm | |
parent | a111daf0c53ae91e71fd2bfe7497862d14132e3e (diff) | |
download | linux-976a062434739dffa1f5eec77f254109247a5a00.tar.xz |
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')
-rw-r--r-- | fs/dlm/plock.c | 2 |
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 |