Skip to content
Commit dd7382a2 authored by Schspa Shi's avatar Schspa Shi Committed by David Sterba
Browse files

btrfs: use non-bh spin_lock in zstd timer callback



This is an optimization for fix fee13fe9 ("btrfs: correct zstd
workspace manager lock to use spin_lock_bh()")

The critical region for wsm.lock is only accessed by the process context and
the softirq context.

Because in the soft interrupt, the critical section will not be
preempted by the soft interrupt again, there is no need to call
spin_lock_bh(&wsm.lock) to turn off the soft interrupt,
spin_lock(&wsm.lock) is enough for this situation.

Signed-off-by: default avatarSchspa Shi <schspa@gmail.com>
[ minor comment update ]
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 49024388
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment