summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_subr.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-05-05 21:27:29 +0000
committerjhb <jhb@FreeBSD.org>2003-05-05 21:27:29 +0000
commitad3e75f51edb275ecaa78bf716f7148a4f647f6d (patch)
tree042e9c27a42dd47921d3c6f6956b257c8a103cb8 /sys/kern/kern_subr.c
parent65572963c9840554ee1c2cf0d0af73e81aa28454 (diff)
downloadFreeBSD-src-ad3e75f51edb275ecaa78bf716f7148a4f647f6d.zip
FreeBSD-src-ad3e75f51edb275ecaa78bf716f7148a4f647f6d.tar.gz
Tweak the clearing of TDF_DEADLKTREAT so that we only bother grabbing the
lock and clearing the flag if it was clear when uiomove() was called.
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r--sys/kern/kern_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index 9e47e4e..0a3052c 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -185,9 +185,9 @@ uiomove(void *cp, int n, struct uio *uio)
n -= cnt;
}
out:
- if (td) {
+ if (td && save == 0) {
mtx_lock_spin(&sched_lock);
- td->td_flags = (td->td_flags & ~TDF_DEADLKTREAT) | save;
+ td->td_flags &= ~TDF_DEADLKTREAT;
mtx_unlock_spin(&sched_lock);
}
return (error);
OpenPOWER on IntegriCloud