]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: merge critical sections of discard lock in workfn
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 6 Dec 2020 15:56:22 +0000 (15:56 +0000)
committerDavid Sterba <dsterba@suse.com>
Fri, 18 Dec 2020 13:59:54 +0000 (14:59 +0100)
commit63b6aadc440b55bebd986cb4d18ffd79656f7b20
treebd5ab32fd2d09451a9ecf9df3bd0dae7acae75a5
parent17470767e2e3b814c8c391c38b2acd759fa94db8
btrfs: merge critical sections of discard lock in workfn

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: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/discard.c