We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2e1d40 commit 4482824Copy full SHA for 4482824
mm/page_vma_mapped.c
@@ -244,16 +244,16 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
244
if (pvmw->address >= end)
245
return not_found(pvmw);
246
/* Did we cross page table boundary? */
247
- if (pvmw->address % PMD_SIZE == 0) {
248
- pte_unmap(pvmw->pte);
+ if ((pvmw->address & (PMD_SIZE - PAGE_SIZE)) == 0) {
249
if (pvmw->ptl) {
250
spin_unlock(pvmw->ptl);
251
pvmw->ptl = NULL;
252
}
+ pte_unmap(pvmw->pte);
253
+ pvmw->pte = NULL;
254
goto restart;
- } else {
255
- pvmw->pte++;
256
+ pvmw->pte++;
257
} while (pte_none(*pvmw->pte));
258
259
if (!pvmw->ptl) {
0 commit comments