Commit a26fa39
committed
iommufd: Improve a few unclear bits of code
Correct a few items noticed late in review:
- We should assert that the math in batch_clear_carry() doesn't underflow
- user->locked should be -1 not 0 sicne we just did mmput
- npages should not have been recalculated, it already has that value
No functional change.
Fixes: 8d160cd ("iommufd: Algorithms for PFN storage")
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Kevin Tian <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reported-by: Binbin Wu <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>1 parent c9b8a83 commit a26fa39
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
292 | 296 | | |
293 | 297 | | |
294 | 298 | | |
| |||
723 | 727 | | |
724 | 728 | | |
725 | 729 | | |
726 | | - | |
| 730 | + | |
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
| |||
810 | 814 | | |
811 | 815 | | |
812 | 816 | | |
813 | | - | |
814 | 817 | | |
815 | 818 | | |
816 | 819 | | |
| |||
0 commit comments