mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mm: use vmf->address instead of of vmf->virtual_address
Every single user of vmf->virtual_address typed that entry to unsigned long before doing anything with it so the type of virtual_address does not really provide us any additional safety. Just use masked vmf->address which already has the appropriate type. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jan Kara <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Cc: Dan Williams <[email protected]> Cc: Ross Zwisler <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
82b0f8c39a
commit
1a29d85eb0
27 changed files with 57 additions and 79 deletions
|
|
@ -328,7 +328,6 @@ static phys_addr_t pgoff_to_phys(struct dax_dev *dax_dev, pgoff_t pgoff,
|
|||
static int __dax_dev_fault(struct dax_dev *dax_dev, struct vm_area_struct *vma,
|
||||
struct vm_fault *vmf)
|
||||
{
|
||||
unsigned long vaddr = (unsigned long) vmf->virtual_address;
|
||||
struct device *dev = &dax_dev->dev;
|
||||
struct dax_region *dax_region;
|
||||
int rc = VM_FAULT_SIGBUS;
|
||||
|
|
@ -353,7 +352,7 @@ static int __dax_dev_fault(struct dax_dev *dax_dev, struct vm_area_struct *vma,
|
|||
|
||||
pfn = phys_to_pfn_t(phys, dax_region->pfn_flags);
|
||||
|
||||
rc = vm_insert_mixed(vma, vaddr, pfn);
|
||||
rc = vm_insert_mixed(vma, vmf->address, pfn);
|
||||
|
||||
if (rc == -ENOMEM)
|
||||
return VM_FAULT_OOM;
|
||||
|
|
|
|||
Loading…
Reference in a new issue