]> git.hungrycats.org Git - linux/commitdiff
btrfs: wakeup cleaner thread when adding delayed iput
authorJosef Bacik <josef@toxicpanda.com>
Wed, 21 Nov 2018 19:09:21 +0000 (14:09 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 13 Mar 2019 21:13:44 +0000 (17:13 -0400)
The cleaner thread usually takes care of delayed iputs, with the
exception of the btrfs_end_transaction_throttle path.  The cleaner
thread only gets woken up every 30 seconds, so instead wake it up to do
it's work so that we can free up that space as quickly as possible.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit f1ddc917349870c5532420a6fd2620146d089123)

fs/btrfs/inode.c

index 23b3128d1d920223bef647916c709337e7de184a..cafd7a9e371bdcdfb2e83c4f1c08cfb46cee7c3a 100644 (file)
@@ -3286,6 +3286,7 @@ void btrfs_add_delayed_iput(struct inode *inode)
                binode->delayed_iput_count++;
        }
        spin_unlock(&fs_info->delayed_iput_lock);
+       wake_up_process(fs_info->cleaner_kthread);
 }
 
 void btrfs_run_delayed_iputs(struct btrfs_fs_info *fs_info)