git: a1dcf2fc8f32 - stable/14 - geom: only set TDP_GEOM for user threads
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 16 Sep 2025 02:50:24 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=a1dcf2fc8f327c5d492278f14c07380b7170fc68
commit a1dcf2fc8f327c5d492278f14c07380b7170fc68
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-09-08 13:46:08 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-09-16 02:44:24 +0000
geom: only set TDP_GEOM for user threads
PR: 289204
(cherry picked from commit b0474e14895908f45c64158b0e558236923b8eb2)
---
sys/geom/geom_event.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c
index 0973b87b36bc..0facaa68a49c 100644
--- a/sys/geom/geom_event.c
+++ b/sys/geom/geom_event.c
@@ -349,6 +349,7 @@ static void
g_post_event_ep_va(g_event_t *func, void *arg, int wuflag,
struct g_event *ep, va_list ap)
{
+ struct thread *td;
void *p;
u_int n;
@@ -368,8 +369,12 @@ g_post_event_ep_va(g_event_t *func, void *arg, int wuflag,
TAILQ_INSERT_TAIL(&g_events, ep, events);
mtx_unlock(&g_eventlock);
wakeup(&g_wait_event);
- curthread->td_pflags |= TDP_GEOM;
- ast_sched(curthread, TDA_GEOM);
+
+ td = curthread;
+ if ((td->td_pflags & TDP_KTHREAD) == 0) {
+ td->td_pflags |= TDP_GEOM;
+ ast_sched(td, TDA_GEOM);
+ }
}
void