diff options
author | Vladimir Kondratyev <wulf@FreeBSD.org> | 2022-05-17 12:10:20 +0000 |
---|---|---|
committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2022-05-17 12:10:20 +0000 |
commit | 41559beb000555770cff1e1b3ef0275157aeb608 (patch) | |
tree | 8291ccccc60efbfd1743fda5acce8204d58415f6 /sys/compat/linuxkpi/common/include/linux/sched.h | |
parent | 29d5f0c148059806d8f0d9e55acdd072994fa450 (diff) | |
download | src-41559beb000555770cff1e1b3ef0275157aeb608.tar.gz src-41559beb000555770cff1e1b3ef0275157aeb608.zip |
LinuxKPI: Fix typo in cond_resched_lock
Lock must be released rather than acquired around mi_switch call.
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D35048
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/sched.h')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/sched.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h index aa4bdbc65c5b..1409df0a4b26 100644 --- a/sys/compat/linuxkpi/common/include/linux/sched.h +++ b/sys/compat/linuxkpi/common/include/linux/sched.h @@ -134,9 +134,9 @@ cond_resched_lock(spinlock_t *lock) if (need_resched() == 0) return (0); - spin_lock(lock); - cond_resched(); spin_unlock(lock); + cond_resched(); + spin_lock(lock); return (1); } |