diff options
author | Ralph Campbell <rcampbell@nvidia.com> | 2019-11-04 14:21:40 -0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-23 19:56:45 -0400 |
commit | d28c2c9a487708b9db519ce7fedc10333032c76b (patch) | |
tree | 651d078ef9d500fb46c53f66577f1bac8f9dcee7 /drivers/hwmon/sch5636.c | |
parent | d3eeb1d77c5d0af9df442db63722928238310a86 (diff) | |
download | linux-d28c2c9a487708b9db519ce7fedc10333032c76b.tar.bz2 |
mm/hmm: make full use of walk_page_range()
hmm_range_fault() calls find_vma() and walk_page_range() in a loop. This
is unnecessary duplication since walk_page_range() calls find_vma() in a
loop already.
Simplify hmm_range_fault() by defining a walk_test() callback function to
filter unhandled vmas.
This also fixes a bug where hmm_range_fault() was not checking start >=
vma->vm_start before checking vma->vm_flags so hmm_range_fault() could
return an error based on the wrong vma for the requested range.
It also fixes a bug when the vma has no read access and the caller did not
request a fault, there shouldn't be any error return code.
Link: https://lore.kernel.org/r/20191104222141.5173-2-rcampbell@nvidia.com
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/hwmon/sch5636.c')
0 files changed, 0 insertions, 0 deletions