summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-02-06 11:02:22 -0500
committerTavian Barnes <tavianator@tavianator.com>2025-02-06 11:02:38 -0500
commit89b03df4f3bd19f9dc717dfc1c03e81d213e4d3d (patch)
tree12f70ce6f20c0c889da3f46acd19f2fc0cab2278
parent0dccdae4510ff5603247be871e64a6119647ea2a (diff)
downloadbfs-89b03df4f3bd19f9dc717dfc1c03e81d213e4d3d.tar.xz
ioq: Use getppid() for the heavy NOP syscall
getpid() could hypothetically be cached (and glibc used to do it). getppid() can't be, because the parent could die and reparent the child to init. Link: https://lore.kernel.org/linux-mm/Z58dIOGlJ3grsAge@casper.infradead.org/
-rw-r--r--src/ioq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ioq.c b/src/ioq.c
index 0e7ac42..064e0e8 100644
--- a/src/ioq.c
+++ b/src/ioq.c
@@ -617,7 +617,7 @@ static void ioq_dispatch_sync(struct ioq *ioq, struct ioq_ent *ent) {
case IOQ_NOP:
if (ent->nop.type == IOQ_NOP_HEAVY) {
// A fast, no-op syscall
- getpid();
+ getppid();
}
ent->result = 0;
return;