From: Takuya Yoshikawa Date: Fri, 28 Sep 2012 00:20:22 +0000 (+1000) Subject: kvm: replace test_and_set_bit_le() in mark_page_dirty_in_slot() with set_bit_le() X-Git-Tag: next-20121005~1^2~131 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=726711b573e406cbbfcc77a81b2c00805f51f2ff;p=karo-tx-linux.git kvm: replace test_and_set_bit_le() in mark_page_dirty_in_slot() with set_bit_le() Now that we have defined generic set_bit_le() we do not need to use test_and_set_bit_le() for atomically setting a bit. Signed-off-by: Takuya Yoshikawa Cc: Avi Kivity Cc: Marcelo Tosatti Signed-off-by: Andrew Morton --- diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index c353b4599cec..e59bb63cb089 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1568,8 +1568,7 @@ void mark_page_dirty_in_slot(struct kvm *kvm, struct kvm_memory_slot *memslot, if (memslot && memslot->dirty_bitmap) { unsigned long rel_gfn = gfn - memslot->base_gfn; - /* TODO: introduce set_bit_le() and use it */ - test_and_set_bit_le(rel_gfn, memslot->dirty_bitmap); + set_bit_le(rel_gfn, memslot->dirty_bitmap); } }