btrfs: Make count_inode_extrefs take btrfs_inode
authorNikolay Borisov <n.borisov.lkml@gmail.com>
Tue, 17 Jan 2017 22:31:49 +0000 (00:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Feb 2017 14:50:57 +0000 (15:50 +0100)
Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c

index c525a685bfa29bfad72fe57f573f387b439c6016..1e466ae5b140c5afd18ff52691d66134dfebce05 100644 (file)
@@ -1362,14 +1362,14 @@ static int insert_orphan_item(struct btrfs_trans_handle *trans,
 }
 
 static int count_inode_extrefs(struct btrfs_root *root,
-                              struct inode *inode, struct btrfs_path *path)
+               struct btrfs_inode *inode, struct btrfs_path *path)
 {
        int ret = 0;
        int name_len;
        unsigned int nlink = 0;
        u32 item_size;
        u32 cur_offset = 0;
-       u64 inode_objectid = btrfs_ino(BTRFS_I(inode));
+       u64 inode_objectid = btrfs_ino(inode);
        u64 offset = 0;
        unsigned long ptr;
        struct btrfs_inode_extref *extref;
@@ -1491,7 +1491,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
 
        nlink = ret;
 
-       ret = count_inode_extrefs(root, inode, path);
+       ret = count_inode_extrefs(root, BTRFS_I(inode), path);
        if (ret < 0)
                goto out;