Skip to content

Commit

Permalink
loop: remove redundant pointer inode
Browse files Browse the repository at this point in the history
Pointer inode is being assigned but is never used hence it is redundant
and can be removed.

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Colin Ian King authored and Jens Axboe committed Jul 9, 2018
1 parent b64a71a commit f4354a9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,6 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
{
struct file *file, *old_file;
struct inode *inode;
int error;

error = -ENXIO;
Expand All @@ -711,7 +710,6 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
if (error)
goto out_putf;

inode = file->f_mapping->host;
old_file = lo->lo_backing_file;

error = -EINVAL;
Expand Down

0 comments on commit f4354a9

Please sign in to comment.