diff options
| author | Jason Gunthorpe <[email protected]> | 2020-05-01 18:20:45 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2020-05-11 13:47:29 +0000 |
| commit | be957c886d92aa9caf0f63aee2c77d1497217d93 (patch) | |
| tree | 945037adedcbcdbf4f3f6e309334d1c0eb583e3f /drivers/fpga/zynq-fpga.c | |
| parent | Linux 5.7-rc4 (diff) | |
| download | kernel-be957c886d92aa9caf0f63aee2c77d1497217d93.tar.gz kernel-be957c886d92aa9caf0f63aee2c77d1497217d93.zip | |
mm/hmm: make hmm_range_fault return 0 or -1
hmm_vma_walk->last is supposed to be updated after every write to the
pfns, so that it can be returned by hmm_range_fault(). However, this is
not done consistently. Fortunately nothing checks the return code of
hmm_range_fault() for anything other than error.
More importantly last must be set before returning -EBUSY as it is used to
prevent reading an output pfn as an input flags when the loop restarts.
For clarity and simplicity make hmm_range_fault() return 0 or -ERRNO. Only
set last when returning -EBUSY.
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Felix Kuehling <[email protected]>
Tested-by: Ralph Campbell <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/fpga/zynq-fpga.c')
0 files changed, 0 insertions, 0 deletions
