btrfs: wakeup cleaner thread when adding delayed iput
[sfrench/cifs-2.6.git] / fs / btrfs / inode.c
index b6025b5d0b25634dd545c31b002adc241fa0b8de..5c349667c761b5fed05a15d565c69eff015709e8 100644 (file)
@@ -3251,6 +3251,8 @@ void btrfs_add_delayed_iput(struct inode *inode)
        ASSERT(list_empty(&binode->delayed_iput));
        list_add_tail(&binode->delayed_iput, &fs_info->delayed_iputs);
        spin_unlock(&fs_info->delayed_iput_lock);
+       if (!test_bit(BTRFS_FS_CLEANER_RUNNING, &fs_info->flags))
+               wake_up_process(fs_info->cleaner_kthread);
 }
 
 void btrfs_run_delayed_iputs(struct btrfs_fs_info *fs_info)