btrfs: Make btrfs_commit_inode_delayed_inode take btrfs_inode
authorNikolay Borisov <n.borisov.lkml@gmail.com>
Tue, 10 Jan 2017 18:35:40 +0000 (20:35 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Feb 2017 14:50:53 +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
fs/btrfs/tree-log.c

index 8b5bb221b3cf038b0cbe6163d5c616a1b6dcb9f4..0470a7eb489ebeb2391d21a0f4dc5d751d8a3ace 100644 (file)
@@ -1231,11 +1231,11 @@ int btrfs_commit_inode_delayed_items(struct btrfs_trans_handle *trans,
        return ret;
 }
 
-int btrfs_commit_inode_delayed_inode(struct inode *inode)
+int btrfs_commit_inode_delayed_inode(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_trans_handle *trans;
-       struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(BTRFS_I(inode));
+       struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(inode);
        struct btrfs_path *path;
        struct btrfs_block_rsv *block_rsv;
        int ret;
index 81572693d0e0fcfe458d12869da903254c27cdb4..cd80fe8f150f46881d77f5425abb571fd69224d8 100644 (file)
@@ -123,7 +123,7 @@ int btrfs_commit_inode_delayed_items(struct btrfs_trans_handle *trans,
 /* Used for evicting the inode. */
 void btrfs_remove_delayed_node(struct btrfs_inode *inode);
 void btrfs_kill_delayed_inode_items(struct btrfs_inode *inode);
-int btrfs_commit_inode_delayed_inode(struct inode *inode);
+int btrfs_commit_inode_delayed_inode(struct btrfs_inode *inode);
 
 
 int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans,
index f63fe82ca28b29b341067140d94529c5dc730da3..26209403fcc2629a1e32f7e52f521e3e58e2fa54 100644 (file)
@@ -5270,7 +5270,7 @@ void btrfs_evict_inode(struct inode *inode)
                goto no_delete;
        }
 
-       ret = btrfs_commit_inode_delayed_inode(inode);
+       ret = btrfs_commit_inode_delayed_inode(BTRFS_I(inode));
        if (ret) {
                btrfs_orphan_del(NULL, inode);
                goto no_delete;
index a056971cd2c4a8d3370c612941ffb04533fee5df..85186fbee0ec1af43b816fc42a140ad20efb54aa 100644 (file)
@@ -4658,7 +4658,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans,
            BTRFS_I(inode)->generation > fs_info->last_trans_committed)
                ret = btrfs_commit_inode_delayed_items(trans, inode);
        else
-               ret = btrfs_commit_inode_delayed_inode(inode);
+               ret = btrfs_commit_inode_delayed_inode(BTRFS_I(inode));
 
        if (ret) {
                btrfs_free_path(path);