liquidio: use list_empty_careful in lio_list_delete_head

Use list_empty_careful() instead of open-coding.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Geliang Tang 2020-06-28 18:14:13 +08:00 committed by David S. Miller
parent 6fc3e68f5b
commit b8483ecaf7

View file

@ -612,7 +612,7 @@ static inline struct list_head *lio_list_delete_head(struct list_head *root)
{
struct list_head *node;
if (root->prev == root && root->next == root)
if (list_empty_careful(root))
node = NULL;
else
node = root->next;