loop: remove redundant pointer inode
authorColin Ian King <colin.king@canonical.com>
Mon, 2 Jul 2018 07:47:06 +0000 (08:47 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Jul 2018 15:07:53 +0000 (09:07 -0600)
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>
drivers/block/loop.c

index 4cb1d1be3cfbc9c14a6129ecdc2de5368ac668c4..bae472646e4a55838d3d8eb03bd30ada0b6d54bd 100644 (file)
@@ -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;
@@ -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;