Skip to content

Commit 49d4287

Browse files
davidhildenbrandmstsirkin
authored andcommitted
virtio-mem: use page_zonenum() in virtio_mem_fake_offline()
Let's use page_zonenum() instead of zone_idx(page_zone()). Signed-off-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/r/20210602185720.31821-3-david@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 500817b commit 49d4287

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/virtio/virtio_mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ static void virtio_mem_fake_online(unsigned long pfn, unsigned long nr_pages)
11351135
*/
11361136
static int virtio_mem_fake_offline(unsigned long pfn, unsigned long nr_pages)
11371137
{
1138-
const bool is_movable = zone_idx(page_zone(pfn_to_page(pfn))) ==
1138+
const bool is_movable = page_zonenum(pfn_to_page(pfn)) ==
11391139
ZONE_MOVABLE;
11401140
int rc, retry_count;
11411141

0 commit comments

Comments
 (0)