diff options
author | Ian Moffett <ian@osmora.org> | 2025-03-14 12:25:30 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-03-14 12:25:30 -0400 |
commit | f70322f7eac222c57b74c04ff5922c4668369778 (patch) | |
tree | 065bf901157f8e2fab55b350a75aaa6a019bd2de /sys | |
parent | a5c50fd8d31e6b620107988d5a1d80d3c3d41f3f (diff) |
kernel: vm: Only hold pgres with timeoutexpt
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_anon.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/vm/vm_anon.c b/sys/vm/vm_anon.c index 9ca8842..2110ecd 100644 --- a/sys/vm/vm_anon.c +++ b/sys/vm/vm_anon.c @@ -87,6 +87,8 @@ anon_get(struct vm_object *obp, struct vm_page **pgs, off_t off, size_t len) continue; } + *pgres = *pgtmp; + /* * We are *just* populating `pgs' and therefore nobody * should even attempt to acquire this lock... Shit @@ -99,9 +101,6 @@ anon_get(struct vm_object *obp, struct vm_page **pgs, off_t off, size_t len) return -ETIMEDOUT; } - /* Hold pgres before configuring it */ - spinlock_acquire(&pgres->lock); - *pgres = *pgtmp; pgres->flags |= (PG_VALID | PG_CLEAN); spinlock_release(&pgres->lock); |