summaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-05-14 20:45:16 -0700
committerGitHub <[email protected]>2020-05-14 20:45:16 -0700
commit2ade659eb4f836931f10b69477657a054d743894 (patch)
tree33701c974d5c1ce7815ab424771d6ee1111d158d /module/os
parenteeb8fae9c7dc9a116f061ee8b266f0a51fd6c8ad (diff)
Fix abd_enter/exit_critical wrappers
Commit fc551d7 introduced the wrappers abd_enter_critical() and abd_exit_critical() to mark critical sections. On Linux these are implemented with the local_irq_save() and local_irq_restore() macros which set the 'flags' argument when saving. By wrapping them with a function the local variable is no longer set by the macro and is no longer properly restored. Convert abd_enter_critical() and abd_exit_critical() to macros to resolve this issue and ensure the flags are properly restored. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10332
Diffstat (limited to 'module/os')
-rw-r--r--module/os/freebsd/zfs/abd_os.c12
-rw-r--r--module/os/linux/zfs/abd_os.c12
2 files changed, 0 insertions, 24 deletions
diff --git a/module/os/freebsd/zfs/abd_os.c b/module/os/freebsd/zfs/abd_os.c
index f438841cd..6b967bc07 100644
--- a/module/os/freebsd/zfs/abd_os.c
+++ b/module/os/freebsd/zfs/abd_os.c
@@ -419,15 +419,3 @@ abd_iter_unmap(struct abd_iter *aiter)
aiter->iter_mapaddr = NULL;
aiter->iter_mapsize = 0;
}
-
-void
-abd_enter_critical(unsigned long flags)
-{
- critical_enter();
-}
-
-void
-abd_exit_critical(unsigned long flags)
-{
- critical_exit();
-}
diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c
index 57e415ef3..a8e8f404d 100644
--- a/module/os/linux/zfs/abd_os.c
+++ b/module/os/linux/zfs/abd_os.c
@@ -803,18 +803,6 @@ abd_iter_unmap(struct abd_iter *aiter)
aiter->iter_mapsize = 0;
}
-void
-abd_enter_critical(unsigned long flags)
-{
- local_irq_save(flags);
-}
-
-void
-abd_exit_critical(unsigned long flags)
-{
- local_irq_restore(flags);
-}
-
#if defined(_KERNEL)
/*
* bio_nr_pages for ABD.