]> asedeno.scripts.mit.edu Git - linux.git/commit
btrfs: zstd: ensure reclaim timer is properly cleaned up
authorDennis Zhou <dennis@kernel.org>
Fri, 22 Feb 2019 19:53:48 +0000 (14:53 -0500)
committerDavid Sterba <dsterba@suse.com>
Wed, 27 Feb 2019 16:45:04 +0000 (17:45 +0100)
commitd3865159ac7823f645d313fdbac0b256ac01eeb9
tree5d2b928fde2612ef2f0210a7decca42396892356
parent7503b83d80f0a3da5dead1293f5454206e7f9db6
btrfs: zstd: ensure reclaim timer is properly cleaned up

The timer function, zstd_reclaim_timer_fn(), reschedules itself under
certain conditions. When cleaning up, take the lock and remove all
workspaces. This prevents the timer from rearming itself. Lastly, switch
to del_timer_sync() to ensure that the timer function can't trigger as
we're unloading.

Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zstd.c