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.
This commit is contained in:
jhb 2003-05-05 21:27:29 +00:00
parent 50d0b44b78
commit f9b7267244

View File

@ -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);