diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2026-01-31 14:20:03 -0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-01-31 14:20:03 -0800 |
| commit | f84b65b045f186b8fbaa32e090688ef3282b56c3 (patch) | |
| tree | 4c1e51b960d36e30b72b0c3c110ecee1a7821133 /lib | |
| parent | 6fe0e6d599a6bb4b65704285d40d4972423b7aaa (diff) | |
| parent | bd58782995a2e6a07fd07255f3cc319f40b131c9 (diff) | |
| download | lwn-f84b65b045f186b8fbaa32e090688ef3282b56c3.tar.gz lwn-f84b65b045f186b8fbaa32e090688ef3282b56c3.zip | |
Merge branch 'mm-hotfixes-stable' into mm-stable to pick up "mm/shmem,
swap: fix race of truncate and swap entry split", needed for merging "mm,
swap: cleanup swap entry management workflow".
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/flex_proportions.c | 5 | ||||
| -rw-r--r-- | lib/test_hmm.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c index 84ecccddc771..012d5614efb9 100644 --- a/lib/flex_proportions.c +++ b/lib/flex_proportions.c @@ -64,13 +64,14 @@ void fprop_global_destroy(struct fprop_global *p) bool fprop_new_period(struct fprop_global *p, int periods) { s64 events = percpu_counter_sum(&p->events); + unsigned long flags; /* * Don't do anything if there are no events. */ if (events <= 1) return false; - preempt_disable_nested(); + local_irq_save(flags); write_seqcount_begin(&p->sequence); if (periods < 64) events -= events >> periods; @@ -78,7 +79,7 @@ bool fprop_new_period(struct fprop_global *p, int periods) percpu_counter_add(&p->events, -events); p->period += periods; write_seqcount_end(&p->sequence); - preempt_enable_nested(); + local_irq_restore(flags); return true; } diff --git a/lib/test_hmm.c b/lib/test_hmm.c index 8af169d3873a..455a6862ae50 100644 --- a/lib/test_hmm.c +++ b/lib/test_hmm.c @@ -662,7 +662,9 @@ static struct page *dmirror_devmem_alloc_page(struct dmirror *dmirror, goto error; } - zone_device_folio_init(page_folio(dpage), order); + zone_device_folio_init(page_folio(dpage), + page_pgmap(folio_page(page_folio(dpage), 0)), + order); dpage->zone_device_data = rpage; return dpage; |
