Jason Gunthorpe 846babe85e mm/hmm: do not unconditionally set pfns when returning EBUSY
In hmm_vma_handle_pte() and hmm_vma_walk_hugetlb_entry() if fault happens
then -EBUSY will be returned and the pfns input flags will have been
destroyed.

For hmm_vma_handle_pte() set HMM_PFN_NONE only on the success returns that
don't otherwise store to pfns.

For hmm_vma_walk_hugetlb_entry() all exit paths already set pfns, so
remove the redundant store.

Fixes: 2aee09d8c116 ("mm/hmm: change hmm_vma_fault() to allow write fault on page basis")
Link: https://lore.kernel.org/r/20200327200021.29372-8-jgg@ziepe.ca
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-03-30 16:58:36 -03:00
..
2019-08-30 22:43:58 -07:00
2020-02-04 03:05:25 +00:00
2019-12-04 11:08:30 -08:00
2020-02-04 03:05:25 +00:00
2020-02-04 07:21:04 +00:00
2020-02-07 14:48:44 -05:00
2019-09-17 15:20:17 -07:00
2020-01-20 08:05:16 +01:00