btrfs: Make btrfs_inode_delayed_dir_index_count take btrfs_inode
authorNikolay Borisov <n.borisov.lkml@gmail.com>
Tue, 10 Jan 2017 18:35:42 +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

index 11ee1ad6bc3d46199229fb50838fd7b3876f8e8b..a64862c53a8a8e96136f074e3dbd925ff0def11e 100644 (file)
@@ -1556,9 +1556,9 @@ end:
        return ret;
 }
 
-int btrfs_inode_delayed_dir_index_count(struct inode *inode)
+int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode)
 {
-       struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(BTRFS_I(inode));
+       struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(inode);
 
        if (!delayed_node)
                return -ENOENT;
@@ -1573,7 +1573,7 @@ int btrfs_inode_delayed_dir_index_count(struct inode *inode)
                return -EINVAL;
        }
 
-       BTRFS_I(inode)->index_cnt = delayed_node->index_cnt;
+       inode->index_cnt = delayed_node->index_cnt;
        btrfs_release_delayed_node(delayed_node);
        return 0;
 }
index 40bf1a94314650b4cad9dca427087b19bf86d486..40327cc3b99a3bdcd517827652969299e1ce2a2b 100644 (file)
@@ -109,7 +109,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
                                   struct btrfs_fs_info *fs_info,
                                   struct btrfs_inode *dir, u64 index);
 
-int btrfs_inode_delayed_dir_index_count(struct inode *inode);
+int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode);
 
 int btrfs_run_delayed_items(struct btrfs_trans_handle *trans,
                            struct btrfs_fs_info *fs_info);
index 26209403fcc2629a1e32f7e52f521e3e58e2fa54..7d8d6c1909177f02e1ad4f6178da498feb436410 100644 (file)
@@ -6103,7 +6103,7 @@ int btrfs_set_inode_index(struct inode *dir, u64 *index)
        int ret = 0;
 
        if (BTRFS_I(dir)->index_cnt == (u64)-1) {
-               ret = btrfs_inode_delayed_dir_index_count(dir);
+               ret = btrfs_inode_delayed_dir_index_count(BTRFS_I(dir));
                if (ret) {
                        ret = btrfs_set_inode_index_count(dir);
                        if (ret)