diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-03-27 17:00:18 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-03-30 16:58:36 -0300 |
commit | f66c9a33aee943aa43b3698c1f6f2619e28a1c77 (patch) | |
tree | 5c193b12d33a780d3deffa24504b85a5c7ee73b4 /mm/hmm.c | |
parent | 6bfef2f9194519ca23dee405a9f4db461a7a7826 (diff) | |
download | linux-f66c9a33aee943aa43b3698c1f6f2619e28a1c77.tar.gz |
mm/hmm: use device_private_entry_to_pfn()
swp_offset() should not be called directly, the wrappers are supposed to abstract away the encoding of the device_private specific information in the swap entry. Link: https://lore.kernel.org/r/20200327200021.29372-7-jgg@ziepe.ca Reviewed-by: Ralph Campbell <rcampbell@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Ralph Campbell <rcampbell@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'mm/hmm.c')
-rw-r--r-- | mm/hmm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/hmm.c b/mm/hmm.c index 8dbd9e1d0308..53192c32abc9 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -267,7 +267,7 @@ static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr, */ if (hmm_is_device_private_entry(range, entry)) { *pfn = hmm_device_entry_from_pfn(range, - swp_offset(entry)); + device_private_entry_to_pfn(entry)); *pfn |= range->flags[HMM_PFN_VALID]; if (is_write_device_private_entry(entry)) *pfn |= range->flags[HMM_PFN_WRITE]; |