diff options
author | Chaitanya Kulkarni <kch@nvidia.com> | 2022-02-16 00:33:08 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-02-28 00:49:49 +0300 |
commit | 0aab29b85478b994422f1551ce36e5640b09db2b (patch) | |
tree | 08a822d9f5cd29c2ad9034a5d7edb6cb8e8a3c83 /drivers/block | |
parent | b27824d31f09ea7b4a6ba2c1b18bd328df3e8bed (diff) | |
download | linux-0aab29b85478b994422f1551ce36e5640b09db2b.tar.xz |
loop: remove extra variable in lo_fallocate()
The local variable q is used to pass it to the blk_queue_discard(). We
can get away with using lo->lo_queue instead of storing in a local
variable which is not used anywhere else.
No functional change in this patch.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Link: https://lore.kernel.org/r/20220215213310.7264-3-kch@nvidia.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/loop.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index a55e5eda1d17..77c61eaaa6e4 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -308,12 +308,11 @@ static int lo_fallocate(struct loop_device *lo, struct request *rq, loff_t pos, * a.k.a. discard/zerorange. */ struct file *file = lo->lo_backing_file; - struct request_queue *q = lo->lo_queue; int ret; mode |= FALLOC_FL_KEEP_SIZE; - if (!blk_queue_discard(q)) { + if (!blk_queue_discard(lo->lo_queue)) { ret = -EOPNOTSUPP; goto out; } |