btrfs: Make btrfs_delayed_delete_inode_ref take btrfs_inode
authorNikolay Borisov <n.borisov.lkml@gmail.com>
Tue, 10 Jan 2017 18:35:37 +0000 (20:35 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Feb 2017 14:50:52 +0000 (15:50 +0100)
Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c
fs/btrfs/delayed-inode.h
fs/btrfs/inode.c

index e4364c1ba99beb1c0be98feb6da5d92c961fe0d5..6e4154a19e67d2998c6e581302079d6ff8e72027 100644 (file)
@@ -1854,9 +1854,9 @@ release_node:
        return ret;
 }
 
-int btrfs_delayed_delete_inode_ref(struct inode *inode)
+int btrfs_delayed_delete_inode_ref(struct btrfs_inode *inode)
 {
-       struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
+       struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb);
        struct btrfs_delayed_node *delayed_node;
 
        /*
@@ -1867,7 +1867,7 @@ int btrfs_delayed_delete_inode_ref(struct inode *inode)
        if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags))
                return -EAGAIN;
 
-       delayed_node = btrfs_get_or_create_delayed_node(BTRFS_I(inode));
+       delayed_node = btrfs_get_or_create_delayed_node(inode);
        if (IS_ERR(delayed_node))
                return PTR_ERR(delayed_node);
 
index adf6a8a0b23a05fb99fd52a66eb4cb286060ca70..dbb02f4d5ddaff340b18187bc25536ac1c43b1e5 100644 (file)
@@ -129,7 +129,7 @@ int btrfs_commit_inode_delayed_inode(struct inode *inode);
 int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans,
                               struct btrfs_root *root, struct inode *inode);
 int btrfs_fill_inode(struct inode *inode, u32 *rdev);
-int btrfs_delayed_delete_inode_ref(struct inode *inode);
+int btrfs_delayed_delete_inode_ref(struct btrfs_inode *inode);
 
 /* Used for drop dead root */
 void btrfs_kill_all_delayed_nodes(struct btrfs_root *root);
index 31917f9c1a9bbedc923176302240fc8a5cb440a6..5afc98f3a5600647093a4f259852dbee2798af62 100644 (file)
@@ -4029,7 +4029,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
         * we update the inode item.
         */
        if (BTRFS_I(inode)->dir_index) {
-               ret = btrfs_delayed_delete_inode_ref(inode);
+               ret = btrfs_delayed_delete_inode_ref(BTRFS_I(inode));
                if (!ret) {
                        index = BTRFS_I(inode)->dir_index;
                        goto skip_backref;