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>
This commit is contained in:
Родитель
a111daf0c5
Коммит
976a062434
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче