summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorChaitanya Kulkarni <kch@nvidia.com>2022-02-15 13:33:09 -0800
committerJens Axboe <axboe@kernel.dk>2022-02-27 14:49:49 -0700
commit9c64e38cc639537ad9b542635af1733e8cb5e19b (patch)
tree27c1829addb5dca70a03fcbddbf43c41aeb72e80 /drivers/block
parent0aab29b85478b994422f1551ce36e5640b09db2b (diff)
loop: remove extra variable in lo_req_flush
The local variable file is used to pass it to the vfs_fsync(). We can get away with using lo->lo_backing_file 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-4-kch@nvidia.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 77c61eaaa6e4..18b30a56bfc4 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -326,8 +326,7 @@ static int lo_fallocate(struct loop_device *lo, struct request *rq, loff_t pos,
static int lo_req_flush(struct loop_device *lo, struct request *rq)
{
- struct file *file = lo->lo_backing_file;
- int ret = vfs_fsync(file, 0);
+ int ret = vfs_fsync(lo->lo_backing_file, 0);
if (unlikely(ret && ret != -EINVAL))
ret = -EIO;