Jason Gunthorpe
be957c886d
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/2-v2-b4e84f444c7d+24f57-hmm_no_flags_jgg@mellanox.com
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-05-11 10:47:29 -03:00
..
2020-04-07 10:43:44 -07:00
2020-04-01 14:56:42 -06:00
2019-09-04 07:42:01 -04:00
2019-07-12 12:24:03 -07:00
2019-12-01 12:59:09 -08:00
2020-04-10 15:36:21 -07:00
2017-11-02 11:10:55 +01:00
2020-04-07 10:43:41 -07:00
2017-11-02 11:10:55 +01:00
2020-04-02 09:35:27 -07:00
2020-04-07 10:43:42 -07:00
2020-01-31 10:30:38 -08:00
2019-08-30 22:43:58 -07:00
2019-07-12 11:05:43 -07:00
2020-04-07 10:43:41 -07:00
2019-09-25 17:51:41 -07:00
2019-06-19 17:09:52 +02:00
2020-04-02 09:35:27 -07:00
2020-04-21 11:11:55 -07:00
2019-12-10 10:12:55 +01:00
2020-05-11 10:47:29 -03:00
2020-04-07 10:43:39 -07:00
2020-04-07 10:43:41 -07:00
2020-04-21 11:11:55 -07:00
2019-12-01 12:59:09 -08:00
2019-10-19 06:32:32 -04:00
2020-04-07 10:43:38 -07:00
2019-06-19 17:09:08 +02:00
2020-04-08 21:03:40 -07:00
2020-02-04 03:05:25 +00:00
2020-04-07 10:43:39 -07:00
2019-06-05 17:37:06 +02:00
2020-04-02 09:35:26 -07:00
2020-04-21 11:11:55 -07:00
2020-04-07 10:43:41 -07:00
2019-11-02 12:39:12 -07:00
2020-04-24 13:28:03 -07:00
2020-04-07 10:43:38 -07:00
2020-04-02 09:35:29 -07:00
2020-04-10 15:36:21 -07:00
2020-04-10 15:36:20 -07:00
2019-09-24 15:54:08 -07:00
2020-04-10 15:36:21 -07:00
2020-04-07 10:43:38 -07:00
2020-04-10 15:36:21 -07:00
2020-04-08 21:03:40 -07:00
2019-03-05 21:07:20 -08:00
2020-04-10 15:36:21 -07:00
2017-11-02 11:10:55 +01:00
2020-04-07 10:43:39 -07:00
2020-02-04 03:05:25 +00:00
2019-09-25 17:51:41 -07:00
2020-04-07 10:43:41 -07:00
2020-04-10 15:36:21 -07:00
2017-03-02 08:42:38 +01:00
2020-02-04 03:05:26 +00:00
2020-03-21 18:56:06 -07:00
2017-11-02 11:10:55 +01:00
2020-04-10 15:36:21 -07:00
2020-04-19 14:07:10 -07:00
2019-09-25 17:51:41 -07:00
2020-03-21 18:56:06 -07:00
2020-01-31 10:30:38 -08:00
2020-04-10 15:36:21 -07:00
2020-04-02 09:35:29 -07:00
2020-04-07 10:43:40 -07:00
2019-06-29 16:43:45 +08:00
2020-02-03 08:05:37 -05:00
2020-04-07 10:43:38 -07:00
2019-10-19 06:32:31 -04:00
2019-09-24 15:54:08 -07:00
2020-04-07 10:43:39 -07:00
2020-04-07 10:43:38 -07:00
2020-01-31 10:30:38 -08:00
2020-04-02 09:35:27 -07:00
2020-02-04 03:05:25 +00:00
2019-03-13 12:25:31 -07:00
2019-06-05 17:37:16 +02:00
2020-04-01 10:09:12 -07:00
2019-06-05 17:37:16 +02:00
2020-04-01 10:09:12 -07:00
2019-12-01 06:29:19 -08:00
2020-03-25 10:04:01 -05:00
2020-02-04 03:05:25 +00:00
2019-05-21 10:50:45 +02:00
2020-04-07 10:43:41 -07:00
2019-06-05 17:37:17 +02:00
2020-04-21 11:11:56 -07:00
2020-04-07 10:43:38 -07:00
2020-04-07 10:43:38 -07:00
2020-04-10 15:36:20 -07:00
2020-01-13 18:19:02 -08:00
2020-04-02 09:35:28 -07:00
2019-10-07 15:47:20 -07:00
2020-04-21 11:11:55 -07:00
2019-07-18 17:08:07 -07:00
2020-04-07 10:43:40 -07:00
2017-11-02 11:10:55 +01:00
2020-04-02 09:35:27 -07:00
2020-04-02 09:35:28 -07:00
2020-04-07 10:43:41 -07:00
2020-04-07 10:43:42 -07:00
2019-10-19 06:32:33 -04:00
2019-09-17 15:20:17 -07:00
2020-04-07 10:43:39 -07:00
2019-12-01 06:29:19 -08:00
2018-09-13 15:18:04 -10:00
2020-04-21 11:11:56 -07:00
2020-04-02 09:35:31 -07:00
2020-04-07 10:43:38 -07:00
2020-04-07 10:43:38 -07:00
2019-12-01 12:59:07 -08:00
2020-03-06 07:06:09 -06:00
2019-05-21 10:50:45 +02:00
2019-09-24 15:54:12 -07:00
2020-04-07 10:43:41 -07:00
2020-04-07 10:43:41 -07:00