Use IDX_TO_OFF().
Reviewed by: markj Discussed with: hselasky Tested by: zeising MFC after: 1 week Sponsored by: Mellanox Technologies Differential revision: https://reviews.freebsd.org/D18606
This commit is contained in:
parent
75772fa26e
commit
069598b941
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342625
@ -538,7 +538,7 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pindex_t pidx, int fault_type,
|
||||
struct vm_fault vmf;
|
||||
|
||||
/* fill out VM fault structure */
|
||||
vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT);
|
||||
vmf.virtual_address = (void *)IDX_TO_OFF(pidx);
|
||||
vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0;
|
||||
vmf.pgoff = 0;
|
||||
vmf.page = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user