btrfs: assert on non-empty delayed iputs
authorJosef Bacik <josef@toxicpanda.com>
Fri, 28 Sep 2018 11:18:03 +0000 (07:18 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:39 +0000 (17:23 +0200)
I ran into an issue where there was some reference being held on an
inode that I couldn't track.  This assert wasn't triggered, but it at
least rules out we're doing something stupid.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c

index 27f6a3348f945d4f7ca1a3f723a1dd3078f32d75..b0ab41da91d122b8cd8c8010cd56973af2afd240 100644 (file)
@@ -3976,6 +3976,7 @@ void close_ctree(struct btrfs_fs_info *fs_info)
        kthread_stop(fs_info->transaction_kthread);
        kthread_stop(fs_info->cleaner_kthread);
 
+       ASSERT(list_empty(&fs_info->delayed_iputs));
        set_bit(BTRFS_FS_CLOSING_DONE, &fs_info->flags);
 
        btrfs_free_qgroup_config(fs_info);