diff mbox series

btrfs: remove unused pointer inode

Message ID 20180828104521.5167-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show
Series btrfs: remove unused pointer inode | expand

Commit Message

Colin King Aug. 28, 2018, 10:45 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer inode is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
variable ‘inode’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/btrfs/inode.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

David Sterba Sept. 6, 2018, 3:59 p.m. UTC | #1
On Tue, Aug 28, 2018 at 11:45:21AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer inode is being assigned but is never used hence it is
> redundant and can be removed.
> 
> 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>
diff mbox series

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c32ca4ca3540..b6921ed5c07b 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -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;