1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

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:
John Baldwin 2003-05-05 21:27:29 +00:00
parent 854dc8c2a1
commit 01de25134f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114758

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