]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: PPC: Book3S HV: Use list_move_tail instead of list_del/list_add_tail
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 17 Oct 2016 15:15:50 +0000 (15:15 +0000)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 21 Nov 2016 04:17:55 +0000 (15:17 +1100)
Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv.c

index 3686471be32bd1a8e987c85dea958e553625fec2..415943198e0f8a8f8f97ac73bc0c1b71d41b495e 100644 (file)
@@ -2123,8 +2123,7 @@ static bool can_dynamic_split(struct kvmppc_vcore *vc, struct core_info *cip)
        cip->subcore_threads[sub] = vc->num_threads;
        cip->subcore_vm[sub] = vc->kvm;
        init_master_vcore(vc);
-       list_del(&vc->preempt_list);
-       list_add_tail(&vc->preempt_list, &cip->vcs[sub]);
+       list_move_tail(&vc->preempt_list, &cip->vcs[sub]);
 
        return true;
 }