Commit 14e8bf83 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Zheng Zengkai
Browse files

btrfs: merge critical sections of discard lock in workfn



stable inclusion
from stable-5.10.9
commit f89d84b35af33b58ec67c78ac7cc670f57ae2466
bugzilla: 47457

--------------------------------

[ Upstream commit 8fc05859 ]

btrfs_discard_workfn() drops discard_ctl->lock just to take it again in
a moment in btrfs_discard_schedule_work(). Avoid that and also reuse
ktime.

Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent b37ec365
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment