btrfs: move ino_cache_inode dropping out of btrfs_free_fs_root
authorJosef Bacik <josef@toxicpanda.com>
Fri, 14 Feb 2020 21:11:41 +0000 (16:11 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:58 +0000 (17:01 +0100)
commit0e996e7fcf2e3a7a5d13b0ed5f9cebc551bd94ba
treeccd65c46e23e1a232c15e2ee7125a2a07eb4949b
parent3fd6372758d91d8ba801e0733b17d082066a04ef
btrfs: move ino_cache_inode dropping out of btrfs_free_fs_root

We are going to make root life be controlled soley by refcounting, and
inodes will be one of the things that hold a ref on the root.  This
means we need to handle dropping the ino_cache_inode outside of the root
freeing logic, so move it into btrfs_drop_and_free_fs_root() so it is
cleaned up properly on unmount.

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
fs/btrfs/transaction.c