btrfs: remove unused pointer inode in relink_file_extents
authorColin Ian King <colin.king@canonical.com>
Tue, 28 Aug 2018 10:45:21 +0000 (11:45 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:28 +0000 (17:23 +0200)
Pointer inode is being assigned but is never used hence it is redundant
and can be removed. It's been unused since the introduction in
38c227d87c49a ("Btrfs: snapshot-aware defrag").

Cleans up clang warning:

  variable ‘inode’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c

index f2ce88d65f90a25f30c6a160706993f8072f2195..56e5237740496553fe863d9581ee0ff7d18c4231 100644 (file)
@@ -2750,12 +2750,9 @@ static void relink_file_extents(struct new_sa_defrag_extent *new)
        struct btrfs_path *path;
        struct sa_defrag_extent_backref *backref;
        struct sa_defrag_extent_backref *prev = NULL;
-       struct inode *inode;
        struct rb_node *node;
        int ret;
 
-       inode = new->inode;
-
        path = btrfs_alloc_path();
        if (!path)
                return;