Merge tag 'for-5.2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
[linux-2.6-microblaze.git] / fs / btrfs / inode.c
index b6d549c..56929da 100644 (file)
@@ -6819,7 +6819,7 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
        u64 extent_start = 0;
        u64 extent_end = 0;
        u64 objectid = btrfs_ino(inode);
-       u8 extent_type;
+       int extent_type = -1;
        struct btrfs_path *path = NULL;
        struct btrfs_root *root = inode->root;
        struct btrfs_file_extent_item *item;
@@ -9250,9 +9250,8 @@ void btrfs_test_destroy_inode(struct inode *inode)
 }
 #endif
 
-static void btrfs_i_callback(struct rcu_head *head)
+void btrfs_free_inode(struct inode *inode)
 {
-       struct inode *inode = container_of(head, struct inode, i_rcu);
        kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
 }
 
@@ -9278,7 +9277,7 @@ void btrfs_destroy_inode(struct inode *inode)
         * created.
         */
        if (!root)
-               goto free;
+               return;
 
        while (1) {
                ordered = btrfs_lookup_first_ordered_extent(inode, (u64)-1);
@@ -9296,8 +9295,6 @@ void btrfs_destroy_inode(struct inode *inode)
        btrfs_qgroup_check_reserved_leak(inode);
        inode_tree_del(inode);
        btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0);
-free:
-       call_rcu(&inode->i_rcu, btrfs_i_callback);
 }
 
 int btrfs_drop_inode(struct inode *inode)