mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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 <mahrens@delphix.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10332
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user