Skip to content

Commit

Permalink
Use is_vmalloc_addr() in vdev_disk.c
Browse files Browse the repository at this point in the history
The initial port of ZFS to Linux required a way to identify virtual
memory to make IO to virtual memory backed slabs work, so kmem_virt()
was created. Linux 2.6.25 introduced is_vmalloc_addr(), which is
logically equivalent to kmem_virt(). Support for kernels before 2.6.26
was later dropped and more recently, support for kernels before Linux
2.6.32 has been dropped. We retire kmem_virt() in favor of
is_vmalloc_addr() to cleanup the code.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
ryao authored and behlendorf committed Jan 16, 2015
1 parent 92119cc commit 71f8548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/vdev_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ bio_map(struct bio *bio, void *bio_ptr, unsigned int bio_size)
if (size > bio_size)
size = bio_size;

if (kmem_virt(bio_ptr))
if (is_vmalloc_addr(bio_ptr))
page = vmalloc_to_page(bio_ptr);
else
page = virt_to_page(bio_ptr);
Expand Down

0 comments on commit 71f8548

Please sign in to comment.