mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Use is_vmalloc_addr() in vdev_disk.c
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 <behlendorf1@llnl.gov>
This commit is contained in:
parent
92119cc259
commit
71f8548ea4
@ -479,7 +479,7 @@ bio_map(struct bio *bio, void *bio_ptr, unsigned int bio_size)
|
|||||||
if (size > bio_size)
|
if (size > bio_size)
|
||||||
size = bio_size;
|
size = bio_size;
|
||||||
|
|
||||||
if (kmem_virt(bio_ptr))
|
if (is_vmalloc_addr(bio_ptr))
|
||||||
page = vmalloc_to_page(bio_ptr);
|
page = vmalloc_to_page(bio_ptr);
|
||||||
else
|
else
|
||||||
page = virt_to_page(bio_ptr);
|
page = virt_to_page(bio_ptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user