aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/abd.c
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/zfs/abd.c
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/zfs/abd.c')
-rw-r--r--module/zfs/abd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/abd.c b/module/zfs/abd.c
index 2e4554da7..abb5d5f2e 100644
--- a/module/zfs/abd.c
+++ b/module/zfs/abd.c
@@ -703,7 +703,7 @@ abd_raidz_gen_iterate(abd_t **cabds, abd_t *dabd,
struct abd_iter caiters[3];
struct abd_iter daiter = {0};
void *caddrs[3];
- unsigned long flags = 0;
+ unsigned long flags __maybe_unused = 0;
ASSERT3U(parity, <=, 3);
@@ -800,7 +800,7 @@ abd_raidz_rec_iterate(abd_t **cabds, abd_t **tabds,
struct abd_iter citers[3];
struct abd_iter xiters[3];
void *caddrs[3], *xaddrs[3];
- unsigned long flags = 0;
+ unsigned long flags __maybe_unused = 0;
ASSERT3U(parity, <=, 3);