aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/sched.h
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2022-05-17 12:10:20 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2022-05-17 12:10:20 +0000
commit41559beb000555770cff1e1b3ef0275157aeb608 (patch)
tree8291ccccc60efbfd1743fda5acce8204d58415f6 /sys/compat/linuxkpi/common/include/linux/sched.h
parent29d5f0c148059806d8f0d9e55acdd072994fa450 (diff)
downloadsrc-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.h4
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);
}