提交 b8483eca 编写于 作者: G Geliang Tang 提交者: David S. Miller

liquidio: use list_empty_careful in lio_list_delete_head

Use list_empty_careful() instead of open-coding.
Signed-off-by: NGeliang Tang <geliangtang@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6fc3e68f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册