mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 20:48:49 +08:00
drm/vmwgfx: Use list_move_tail instead of list_del/list_add_tail in vmwgfx_cmdbuf_res.c
Using list_move_tail() instead of list_del() + list_add_tail() in vmwgfx_cmdbuf_res.c. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Signed-off-by: Zack Rusin <zackr@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210609072248.1353421-1-libaokun1@huawei.com
This commit is contained in:
parent
aa841a99f2
commit
1cb48cf3b1
@ -169,8 +169,7 @@ void vmw_cmdbuf_res_revert(struct list_head *list)
|
|||||||
case VMW_CMDBUF_RES_DEL:
|
case VMW_CMDBUF_RES_DEL:
|
||||||
ret = drm_ht_insert_item(&entry->man->resources, &entry->hash);
|
ret = drm_ht_insert_item(&entry->man->resources, &entry->hash);
|
||||||
BUG_ON(ret);
|
BUG_ON(ret);
|
||||||
list_del(&entry->head);
|
list_move_tail(&entry->head, &entry->man->list);
|
||||||
list_add_tail(&entry->head, &entry->man->list);
|
|
||||||
entry->state = VMW_CMDBUF_RES_COMMITTED;
|
entry->state = VMW_CMDBUF_RES_COMMITTED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user