Skip to content

Commit

Permalink
kvm: replace test_and_set_bit_le() in mark_page_dirty_in_slot() with …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Cc: Avi Kivity <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Takuya Yoshikawa authored and torvalds committed Oct 5, 2012
1 parent 0ef8fa6 commit b74ca3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit b74ca3b

Please sign in to comment.